j_U1p1.java

import java.util.Scanner; class prog1 { public static void main(String []args) { int a,x,y; Scanner sc= new Scanner(System.in); System.out.println("enter the x="); x=sc.nextInt(); System.out.println("enter the y="); y=sc.nextInt(); a = (x*x)+(y*y); System.out.println("hypotenuse="+Math.sqrt(a)); } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.