Program3_PythagoreanTriplesSp06(1)

Program3_PythagoreanTriplesSp06(1) - CIS 120 PROGRAMMING...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CIS 120 PROGRAMMING ASSIGNMENT 3 Looping Control Structures Due: March 27, 2006 Write a program that will display all the Pythagorean Triples where the sides of the right triangles do not exceed an integer value inputted by the user. Pythagorean Triples are right triangles with all integer length sides. For example, 3-4-5 is a Pythagorean Triple. Your program should prompt the user for given value and should provide a list of all the Pythagorean Triples in the given range. For example, if the user enters a 10, then your program should display a list of all Pythagorean Triples where all the sides are 10 or less. This program will require several loops. You are to write three versions of your program. The first version will be called RightTriplesWhile.java that will be written only with while loops, the second version will be called RightTriplesFor.java that will be written only with for loops, and the third version will be called RightTriplesDoWhile.java that will be written only with do-while loops. If the user inputs a negative number, then the program should display an error message
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

Program3_PythagoreanTriplesSp06(1) - CIS 120 PROGRAMMING...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online