Years of Service Qualifications Salary

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Note: The Exercise needs that you know about relational operators.

Please read relatonal


operators first before you go through it

1. Write a program that determines a student’s grade. Based on entered marks, Criteria is


Greater than 90 A+, Greater than or equal to 80 A
Greater than or equal to 70 B, Greater than or equal to 60 C
Greater than or equal to 50 D, Less than 50 F
2. Write a C program to input two numbers and find maximum between two.
3. Write a C program to input three numbers and find maximum between three.
4. Write a C program to input any number and check whether it is negative, positive or
zero.
5. Write a C program to input week number and print week day name.
6. Write a C program to input angles of a triangle and check whether triangle is valid or
not.
7. Write a C program to input all sides of a triangle and check whether triangle is
Equilateral, Isosceles or Scalene triangle.
8. Write a C program to input cost price and selling price of a product and calculate profit
or loss.
9. A company insures its drivers in the following cases:
− If the driver is married.
− If the driver is unmarried, male & above 30 years of age.
− If the driver is unmarried, female & above 25 years of age.
In all other cases the driver is not insured. If the marital status, sex and age of the driver
are the inputs, write a program to determine whether the driver is to be insured or not
10. Write a program to calculate the salary as per the following table:
Gender Years of Service Qualifications Salary
Male >= 10 Post-Graduate 15000
>= 10 Graduate 10000
< 10 Post-Graduate 10000
< 10 Graduate 7000
Female >= 10 Post-Graduate 12000
>= 10 Graduate 9000
< 10 Post-Graduate 10000
< 10 Graduate 6000
11. Write a C program to input cost price and selling price of a product and calculate
profit or loss.
12. Write a C program to input any alphabet and check whether it is vowel or consonant.
13. Write C program to input and year and check if it is a leap year or not.

You might also like