Stop giving him code! This is for a homework assignment or somethign similar. He needs to learn how to do it not have it told to him.
OK. As it is a very simple thing only the matter is just to know with the syntax
to do the specied task I entered the code.
Any way now I am giving the Algorithmic hint now :
1. Get the highest number from user which needs to be displayed
2. Create one for loop for number of lines to display. In this for loop
display new line char as the last statement
3. In the above for loop, nest one more for loop to display all the numbers
which should appear on the screen
4. End your program
for the outer "for loop" get the highest value as the initial value for the
variable and keep decrementing till it reaches zero in successive iterations.
In the inner for loop use Outer for loops variable as initial value and keep
decrementing till it becomes zero in successive iterations.
Thanks,
Girish Kanakagiri