I need to do a BASICE For Loop algorithm for a java Pyramid
- by user1665119
Question 2. USE THE FOR LOOP.
Design and write an algorithm that will read a single positive number from the keyboard and will then print a pyramid out on the screen. The pyramid will need to be of a height equal in lines to the number inputted by the operator. Your program is not to test for negative numbers, nor is it to cater for them. For your test, use the number 7. If you would like to take the problem further, try 18 and watch what happens.
Example input:
4
Example output:
1
121
12321
1234321