I have a program that I need to print out a in the following manner:
10 11 12 13 14 15 16 17 18 19
20 21 22 23 24 25 26 27 28 29
30 31 32 33 34 35 36 37 38 39
40 41 42 43 44 45 46 47 48 49
I have figured out how to print them out, but not break the lines up as so. I also need the program to be able to handle a range of values not just these. I know I can do this as a nested for loop. I am just not sure how... Any help would be appreciated!
class numTable {
public static void main (String args[]){
for (int i=10; i < 50; i++){
switch (i){
case 19:
case 29:
case 39:
System.out.println (" " + i);
break;
default: System.out.println(" " +i);
}
}
}
}