GT500FOMOCO
Programmer
I am writing a multiplicationa table for the first 10 numbers. I can't keep the program from going over 10. It just keeps going on and on. Here is my code:
"and everything under the sun is in tune
but the sun is eclipsed by the moon." --Pink Floyd: Eclipse
"I'm going to spend eternity
reinstalling Windows." --Reinstalling Windows: by some British guy
Code:
public class MultiplicationTable {
public static void main(String[] args) {
int multiply = 1;
System.out.print("\n\n");
for (int start = 1; start <= 10; start++) {
for (int lessStart = 10; start <= lessStart; lessStart = lessStart + 10) {
System.out.print("\t" + (start * multiply));
multiply = multiply + 1;
}
System.out.print("\n");
}
}
}
but the sun is eclipsed by the moon." --Pink Floyd: Eclipse
"I'm going to spend eternity
reinstalling Windows." --Reinstalling Windows: by some British guy