Write a program with Do – Enddo loop.
Display squares of numbers 1 to 10
1 1
2 4
3 9
2 Write a program to accept a number (say 2) from user and create a multiplication table.
2 x 1 = 2
2 x 2 = 4
…………
2 x 10 = 20
3 Accept a number from user and find Factorial of the same. If the number is negative then display some message.
4 Write a program with Do – Enddo loop for first 20 numbers.
- Output should contain only Even number
- Odd numbers should not be displayed
5 Accept numbers and choice ‘EVEN’ or ‘ODD’ from the user and display the numbers in that range according to user’s choice.
6 Write a program with Do – Enddo loop for first 20 numbers.
- Odd numbers & Even numbers should be displayed with alternate intensities. (Use Format intensified – on – off)
7 Create a calculator, which performs the four basic types of calculations on two whole numbers. The two values and the option are to be entered on the selection screen as parameters. Output the result with 2 decimal places.
8 Write separate programs using ‘CONTINUE’ and ‘EXIT’ statements in DO-LOOP.
No comments:
Post a Comment