PythagoreanTheorem

PythagoreanTheorem - public void run() {...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/* * File: PythagoreanTheorem.java * Name: * Section Leader: * ----------------------------- * This file is the starter file for the PythagoreanTheorem problem. */ import acm.program.*; public class PythagoreanTheorem extends ConsoleProgram {
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: public void run() { println("Enter values to compute Pythagorean theorem."); print("a: "); int a=readInt(); print("b: "); int b=readInt(); double c=Math.sqrt((a*a)+(b*b)); println("c = "+c); } }...
View Full Document

This note was uploaded on 10/25/2010 for the course CS 106A at Stanford.

Ask a homework question - tutors are online