Computer Science, asked by charvikukreja, 11 months ago

Write a program to find the area of a rectangle using variables.

Answers

Answered by thilakartpeks4f
1

Answer:

public class rectangle{

public static void main(String args[])

{

int width=5;

int height=10;

int area=width*height;

System.out.println("Area of rectangle="

Answered by Akiriti
0

Answer:

Program 1:

User would provide the length and width values during execution of the program and the area would be calculated based on the provided values.

width = scanner.nextDouble();

//Area = length*width;

double area = length*width;

System.out.println("Area of Rectangle is:"+area);

Similar questions