Practice Sheet 2
Practice Sheet 2
1- Write a program to build a simple calculator (+, - , * and / operators). Get input
from user via menu and use ifs to calculate accordingly.
2- WAP to get two strings from user and check if they are equal.
3- WAP to input number ‘a’ and ‘b’ and ‘c’, check the largest number among them
and display result.
4- WAP to get monthly salary details from employee, Employees are categorized in
3 grades-
40,000 > Salary <= 80,000 à Grade A
80,000> Salary <=1,20,000 à Grade B
Salary >1,20,000 à Grade C
Check the Grade of the employee, now calculate the bonus for the employee on
basis of Grades and department, follow along the table below –
Grade Department Bonus
A Marketing 10 %
A Sales 20 %
B Marketing 15 %
B Sales 25%
C All 30 %