ASSIGNMENT -4
1)Write a program to check whether a number is
odd or even using if –else?
2)Write a program to check the greatest number
among three numbers?
3)Write a program to check whether a person is
eligible to vote or not?
4)Write a program to calculate the grade of a
student according to the specified marks.
MARKS GRADES
>=80 and <=100 Grade A
>=60 and <80 Grade B
>=40 and <60 Grade C
<40 Fail
5)Write a program to check which sport will be
played by a student according to the specified
Age?
AGE SPORTS
Age>=5 and <=11 Jumping Jags
Age>=12 and <=16 Gymnastics
Age>=17 and <=23 Cricket
Age>=24 and <=30 Basketball
Age>=31 and <=40 Volleyball
Age>=41 Audience
6)Write a program to check whether a character
entered is an alphabet, digit or special
character?
7) Write a menu driven program to solve this
program:
Even and Odd Program
Positive and Negative Program
Leap Year
8) Write a menu driven program to solve this
program:
Greatest number among three numbers
Print a table of 10
Print only even numbers between 20 to 100
9)Write a menu driven program to solve this
program:
Simple Interest and Amount
Area of a circle
Area of a square
Area of a rectangle
10)Write a menu driven program to solve this
program:
Alphabet, Digit, Special Symbol
If a person is eligible to vote or not
Personal details of you
11)Write a program to print following pattern:
******
******
******
******
12)Write a program to print following pattern:
11111
22222
33333
44444
55555
13)Write a program to print following
pattern:
1
22
333
4444
5555
14)Write a program to print following
pattern:
1
11
111
1111
11111
15)Write a program to print following
pattern:
*****
****
***
**
*
16)Write a program to print following
pattern:
Hi
Hi Hi
Hi Hi Hi
Hi Hi Hi Hi
Hi Hi Hi Hi Hi
17)Write a program to print following
pattern:
H
He
Hel
Hell
Hello
18)Write a program to calculate the sum of
digits of a number?
19)Write a program to calculate the multiply
of digits of a number?
20)Write a program to check whether a
number is a palindrome number or not?
21)Write a program to calculate the factorial
of a number?
22)Write a program to reverse a number you
enter?