Computer Science, asked by manvirs451, 8 months ago

Write a java program to find the diagonal of a rectangle. Take length and breadth as input

Answers

Answered by anamikagungun
0

Answer:

we multiply both no. firsly to find java

Answered by Anonymous
1

import java.util.*;

public class Diagonal

{

public static void main (String args[])

{

Scanner in = new Scanner(System.in);

int l, b;

double d;

System.out.println("enter the length and breadth of the rectangle:");

l = in.nextInt();

b = in.nextInt();

d = Math.sqrt(l*l + b*b);

System.out.println("Diagonal of the rectangle =");

}

}

Similar questions