how to Create a program to find the area of Rectangle.
2. Create a program to find the area of Square.
please answer my question
Answers
Answered by
1
Answer:
You haven't written in which language so I'm just writing logic
//Rectangle
int length,breadth
Take input of length and breadth
print(length*breadth)
//Square
int side
Take input of side
print(side*side)
Read my bio once
Answered by
1
Answer:
import java.util.*;
public class sky
{
public static void main (string []args)
{
int l,b,s;
double rect,squa;
Scanner in=new Scanner (System.in);
System.out.println("enter the value of l,b and s);
l=in.nextInt();
b=in.nextInt();
s=in.nextInt();
rect=l*b;
squa=math.sqrt(s,2) ;
System.out.println("area of rectangle"+rect);
System.out.println("area of square"+squa);
}
}
Similar questions
Social Sciences,
2 months ago
History,
2 months ago
Hindi,
5 months ago
Math,
5 months ago
Political Science,
9 months ago
Math,
9 months ago