View Full Version : Need help with a Java program
Tercel
September 16th, 2006, 12:13 PM
The assignment was to make a program that generates pythagorean triples for variables entered ( 'n' and 'm'). i think i have everything set correctly but why does it say i havent initialized the variables when i clearly did :(
http://img.photobucket.com/albums/v219/timmercuz/Random/untitled.jpg
TheMOB
September 16th, 2006, 12:17 PM
You can't compute sideOne and sideTwo using m and n until m and n have been intialized (read in the from the keyboard). Just move the sideOne=, sideTwo=, and hypotenuse= lines below the m = keyboard.nextDouble(); line.
Tercel
September 16th, 2006, 12:25 PM
ahh thank you so much it works now--ill remember that for next time :X
TheMOB
September 16th, 2006, 12:29 PM
np
snatch
September 18th, 2006, 03:51 PM
i dont know if that was a hard fix to find or not, but TheMOB is the man. he helped me more times than i can remember when i was taking java classes my first two years of college.
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.