public class PythagoreanTheorem { public static void main(String args[]) { double a=4; double b=5; double c = Math.sqrt(a * a + b * b); System.out.println("c = " + c); } }