post  Need to make a triangle with varying width and height

Soujirou (11)   Link to this post
*
* *
* *

I need to make that and let the user pick the height and width, any ideas?

Thank You
Bazzy (4108)   Link to this post
The height would be the number of rows so it isn't much a problem.
The number of stars per row can be made equal to width/height*rownumber
Soujirou (11)   Link to this post
so i just noticed the triangle didnt come out the right way

00*00
0*0*0
*000*

it should be like that but spaces in place of zeroes. the rest of the program is just rectangles and i already got that, i'm just having a hard time with the triangle since thestarts are spaced in a weird way.
buffbill (194)   Link to this post
Have you tried mixing up your stars * with blank spaces " " using 2 for loops?

This topic is archived - New replies not allowed.