Computer Science, asked by nityaagarwal2007, 2 months ago

Write a program to input length and breadth of a rectangle and print its area,perimeter and diagonal depending on user choice (using switch case)​

Answers

Answered by tojoroy69
0

Answer:

Explanation:

imort java.scanner;

public class rectangle

{

public static void main()

{

int l, b, a, p, d;

Scanner sc = new Scanner(System.in);

l = sc.nextInt();

b = sc.nextInt();

a = l*b;

p = 2*(l+b);

d = √(l*l + b*b):

SOPln("Area"+a);

SOPln("Perimeter"+p);

SOPln("Diagonal"+d);

}

}

Similar questions