1. Write a C
program to accept two integers and check whether they are equal or not.
2. Write a
program to check whether a number is odd or even. (if else statement).
3. Write a C
program to check whether a given number is positive or negative. (if else
statement).
4. Write a C
program to read the age of a candidate and determine whether he is eligible to
cast his/her own vote. (if else statement).
5. Write a C
program to accept the height of a person in centimeters and categorize the
person according to their height. ()
< 150.0 CM
|
person is Dwarf
|
150.0 >= &&
< 165.0
|
person is average heighted
|
>= 165.0 && <=
195.0
|
person is taller
|
>195
|
abnormal height
|
6. Write a program in C to accept a grade and declare the equivalent description:
Grade Description
E Excellent
V Very Good
G Good
A Average
F Fail
7. Write a C program for reading any Month Number and displaying the Month name as a word. (Using Switch Case)
8. Write a C
program to read temperature in centigrade and display a suitable message
according to the temperature state below: (Using Else If Ladder)
Temp < 0 then Freezing
weather
Temp 0-10 then Very Cold
weather
Temp 10-20 then Cold weather
Temp 20-30 then Normal in Temp
Temp 30-40 then Its Hot
Temp >=40 then Its Very Hot