Center Alignment.
i wish to do an output like this~
Sample Run 1:
Enter height: 3
*
***
*****
Sample Run 2:
Enter height: 5
*
***
*****
*******
*********
my code only can do this:
Enter height: 5
*
**
***
****
*****
Please help~
Last edited on
Perhaps you're thinking too complicated.
You just need to add an appropriate number of spaces before each line.
Topic archived. No new replies allowed.