If-Else Exercises: Write A Program To Find Maximum Between Two Numbers
If-Else Exercises: Write A Program To Find Maximum Between Two Numbers
8. Write a program to input any character and check whether it is alphabet, digit or special
character
9. Write a program to check whether a character is uppercase or lowercase alphabet
10. Write a program to input week number and print week day
11. Write a program to input month number and print month Name
12. Write a program to input a product selling price and buying price then calculate profit or
loss
13. Write a program to input marks of five subjects Physics, Chemistry, Biology,
Mathematics and Computer. Calculate average and grade according to following:
Percentage >= 90% : Grade A
Percentage >= 80% : Grade B
Percentage >= 70% : Grade C
Percentage >= 60% : Grade D
Percentage >= 40% : Grade E
Percentage < 40% : Grade F
14. The marks obtained by a student in 5 different subjects are input through the
keyboard. The student gets a division as per the following rules: Write a program to
calculate the division obtained by the student
Percentage above or equal to 60 - First division
Percentage between 50 and 59 - Second division
Percentage between 40 and 49 - Third division
Percentage less than 40 – Fail
15. Write a program to calculate the salary as per the following table. (print out -
Salary)
17. Find the absolute value of a number entered through the keyboard.
(change negative number into positive number)
18. Write a program that accepts three numbers and check All numbers are equal or two
number are equal or all are different.
21. Write a program that accepts three numbers from the user and prints "increasing" if the
numbers are in increasing order, "decreasing" if the numbers are in decreasing order, and
"Neither increasing or decreasing order" otherwise.
Eg
num1 = 10;
num2 = 20;
num3 = 30;
output : Increasing Order
num1 = 30;
num2 = 20;
num1 = 10;
output: Decreasing Order
num1 = 30;
num2 = 5;
num1 = 10;
output: Neither Decreasing nor Increasing Order