CLASS XI COMPUTERSCIENCE WORKSHEET 4 IF ELSE STATEMENTS

INDIAN SCHOOL MUSCAT COMPUTER SCIENCE(083) CLASS XI 2017-2018 WORKSHEET – 4 Topic: if…else statements 1. Write a progra...

2 downloads 108 Views 496KB Size
INDIAN SCHOOL MUSCAT COMPUTER SCIENCE(083) CLASS XI 2017-2018

WORKSHEET – 4 Topic: if…else statements 1. Write a program to print the smallest of 3 given integers. 2. Write a program to accept the monthly salary from the user. Compute and display income tax with the help of the following rules. Monthly Salary 9000 or more 7500 -8999 7499 or less

Income tax 40% of monthly salary 30% of monthly salary 20% of monthly salary

3. Write a Program to input the code of a particular item, the quantity purchased and the rate. Calculate the total purchase and print it along with the gifts to be presented. The gifts to the customers are given in the following manner : Amount of Purchase (Rs.) 100 and above but less than 500 500 and above but less than 1000 1000 and above

Gift A pen drive A leather purse Scientific calculator

4. Write a Program which reads employee code(long int), department code (long int), salary(float) and experience(in years - int type) of an employee and categorise as Grade ‘A’, ‘B’ or ‘C’ based on the following conditions: * employees who have 20 or more than 20 years of experience and salary above 10000 belong to grade ‘A’ * employees who have more than 10 years of experience but less than 20 years of experience and salary above 5000 belong to grade ‘B’ * all employees of department code 12121 belong to grade ‘B’ * all others belong to grade ‘C’