Computer Science, asked by adfrt, 11 months ago

write a program to accept the sides of a rectangle and calculate its area

Answers

Answered by Anonymous
2

Required Program

Width = float(input('Please Enter the WIDTH of a Rectangle: '))

Height = float(input('Please Enter the height of a Rectangle: '))

Area = Width * Height

print("Area of a Rectangle is: " Area)

  • hope it helps...
Attachments:
Answered by Anonymous
1

import java.util.*;

public class Area

{

public static void main(String args[])

{

Scanner in=new Scanner(System.in);

int z,x,a;

System.out.println("Enter the sides of the rectangle");

z=in.nextInt();

x=in.nextInt();

a=z*x;

System.out.println("The area is"+a);

}

}

Similar questions