Chapter 12 Paper
Chapter 12 Paper
Long Questions 20
1) What is nested loop? Give its syntax. Explain its working with an example?
2) Define “for” loop. Write its syntax, draw flow chart and explain its working with the help of
example.
3) Write a program that display first five numbers and their sum using while loop.
4) Write a program which prints natural numbers from 1 to 100.
5) Write a program that display first ten odd numbers using do-while loop.
6) Write a program that displays the following block using nested for loop.
*****
*****
*****
*****
*****
7) Write a program that display the following shape using nested for loops.
*
**
***
****
*****
8) Write a program that display the following using do-while loop.
4 4 4 4
3 3 3
2 2
1