Computer Science, asked by gambhr, 1 year ago

Write a java program to find the area of rectangle?

Answers

Answered by kokan6515
3
double length= Double.parseDouble(jTextfield1.geText());
double breadth= Double.parseDouble(jTextfield2.geText());
double area = length× breadth;
jTextfield3.setText(" "+ area);
Answered by NeneAmaano
3
import java.io.*;
import java.lang.*;
import java.util.*;
class area
{
public static void main (String arts[ ])throws IOException
{int l,b,a=0;
Scanner sc=new Scanner (System.in);
System.out.println("Enter length=");
l=next.Int();
System.out.println("Enter breadth=");
b=next.Int();
a=l*b;
System.out.println("Area of rectangle="+a);
}
}

Hope it helps^_^
Similar questions