/* * File: PythagoreanTheorem.java * Name: Axel Werner * Section Leader: * ----------------------------- * This file is the starter file for the PythagoreanTheorem problem. */ import acm.program.*; public class PythagoreanTheorem extends ConsoleProgram { public void run() { println("PythagoreanTheorem : c² = a² + b²\n" + "======================================\n\n"); int a = readInt("Enter a Value for 'a': "); int b = readInt("Enter a Value for 'b': "); double result = Math.sqrt( (a*a) + (b*b) ); println("The Result c = sqrt(a²+b²) is: " + result ); } }