----21
---321
--4321
-54321
654321
123456
-12345
--1234
---123
----12
-----1
_______
I cannot seem to create this. Any help is appreciated.
what i've got so far:
public class HW4 {
public static void main(String[] args) {
int count = 1, count2 = 1;
String lineNum = "1";
for(count = 1; count>=6; count++){
for (count2 = 6; count2>=count; count2--){
if (count2==count){
System.out.print(lineNum);
}
System.out.print(" ");
}
System.out.println();
}
}
}
i thought this would print the first line but it doesn't print anything.
Edited by ZekeDragon, 20 September 2010 - 08:33 PM.
Please use [code] tags when posting code.


Sign In
Create Account

Back to top









