import java.util.*;
class demo
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
double l, b, d;
System.out.println("Enter the length and breadth of the rectangle:");
l = sc.nextDouble();
b = sc.nextDouble();
d = Math.sqrt(l * l + b * b);
System.out.println("Diagonal= " + d);
}
}
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP