Java stars
188 views ![]()
An example to show "stars" in the command line interface. (Replace the "x" into "*" ) This is a common homework question but frequently asked for in the Java forums that i go to so here it is.
Output
x
xx
xxx
xxxx
xxxxx
xxxxxx
xxxxxxx
xxxxxxxx
xxxxxxxxx
xxxxxxxx
xxxxxxx
xxxxxx
xxxxx
xxxx
xxx
xx
x

(3 votes, average: 4.67 out of 5)


