How do you program in java to have an output like this:
Its a pyramid, by the way.Code:1
212
32123
4321234
543212345
Thanx.
Printable View
How do you program in java to have an output like this:
Its a pyramid, by the way.Code:1
212
32123
4321234
543212345
Thanx.
Here you get half a pyramid. :D
Code: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);
}
}
}
What about the other half?:(
Some people are never satisfied. :rolleyes: :D