Ok, I need help on a for loop nested program using for loops, I'm trying to use a patten that goes like this:
123456
12345
1234
123
12
1
but when I try it, it goes like this:
654321
65432
6543
654
65
6
This is my program:
public class Patterns{
public static void main (String [] args) {
//set up for the rows
for(int row = 1 ; row <= 6; row++){
for (int num = 6; num >= row; num--){
System.out.print(num);
}
System.out.println();
}
}
}
Can anybody help please? thanks