Diwali Break Programming assignment for Class -9 ( Computer Applications) -
2024
1. Write a menu driven program using switch-case construct which perform all arithmetic
operations like add, subtract, divide, multiplications and modulus. Print the message if user
enters wrong input too.
2. Write a program to calculate the water tax consumed according to following charts:
Water consumed Tax Rate
( in Gallons) ( in Rs.)
upto 60 Nil
>=60 but 120 or less 200
>=120 but 220 or less 300
>220 but 350 or less 600
>350 900
3. Print the Fahrenheit equivalent of centigrade temperatures or vice versa according to user
choice using menu driven program.
4. Write a program to check whether number entered by user is Armstrong number or not.
( eg.- 153 as 13+53+33=153)
5. Print the Fibonacci number series from 1 to a given number entered by the user.
( eg- 0,1,1,2,3,5,8 ....... 0,1 and next number is sum of previous two digits)
6. Write a program to check if a number entered by user is prime-palindrome number or not.
( eg- 131, as 131 is palindrome number as reverse of 131 is again 131 and it is prime too, as
it is divisible by only 1 and itself.)
7. Write a program to print sum of all the digits of a number entered by user.
( eg- 258. 2+5+8=15)
8. Write a program to print the following sequence of numbers.
1,4,9,25...... till 10 terms. Do find out the sequence which is being followed here.)
9. Write a program to print the below pattern for n rows.
5
54
543
5432
54321
10. Write a program to print sum of all the even number and odd number separately between
the range specified by the user.
( eg. start range -200 and end range is 500 entered by user. so find the sum of all the even and
odd number sum between 200 to 500)
***********