import java.util.*;
class Program5
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
System.out.print("\nenter value for x: ");
double x = sc.nextInt();
System.out.print("\nenter value for y: ");
double y = sc.nextInt();
double h = Math.sqrt((x*x) + (y*y));
System.out.print("\nHypotenuse of right angled triangle is: " + h);
}
}
No comments:
Post a Comment