You are on page 1of 1

3)

import java.util.Scanner;

class Rectangle{
int length;
int breadth;

void setDim(int a, int b){


length = a;
breadth = b;
}
int Area(){
return length*breadth;
}
}

public class Ans{


public static void main(String[] args){
Scanner input = new Scanner(System.in);
int a = input.nextInt();
int b = input.nextInt();
Rectangle rec = new Rectangle();
rec.setDim(a, b);
System.out.println(rec.Area());
}
}

You might also like