Click to See Complete Forum and Search --> : Help!
Ezra
Jan 15th, 2003, 11:51 PM
How do you program in java to have an output like this:
1
212
32123
4321234
543212345
Its a pyramid, by the way.
Thanx.
Dillinger4
Jan 16th, 2003, 12:07 AM
Here you get half a pyramid. :D
class Builder {
public static void main(String[] args){
StringBuffer sb = new StringBuffer();
for(int i = 0; i < 15; ++i){
sb.append(i);
System.out.println(sb);
}
}
}
Ezra
Jan 16th, 2003, 12:24 AM
What about the other half?:(
Dillinger4
Jan 16th, 2003, 12:51 AM
Some people are never satisfied. :rolleyes: :D
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.