You are on page 1of 2

CS 11 - HOLIDAY HOMEWORK

SOLVE THE FOLLOWING PROGRAMS AND SUBMIT THEM IN A FILE AS PRINTOUTS.


1) WAP to input an year (eg: - 1994) and check if it is a leap year or not
2) WAP to find the LCM and GCD of two numbers.
3) WAP to accept the age of n employees and count the number of persons in the following age
group.
(i) 26-35
(ii) 36-45
(iii) 46-55.
4) WAP to find number of 500, 100, 50, 20, 10, 5, 2 and 1 Rs. notes in a given money.
Eg. Input : 1453
Output : No of 500 = 2
No of 100 = 4
No of 50 = 1
No of 20 = 0
No of 10 = 0
No of 2 = 1
No of 1 = 1
5) In a company an employee is paid as follows :
Salary
(i) less than 2,000
(ii) greater than or equal to 2,000 but less than 4,000
(iii) greater than or equal to 4,000 but less than 8,000
(iv) greater than 8,000

DA
10%
25%
30%
40%

HRA
5%
15%
25%
30%

Find the net salary of an employee.


6) A bank accepts fixed deposits for one year or more and the policy it adopts on interests as follows
(i) If a deposit is less than Rs .2000 and for 2 or more years, the interest rate is 5 percent
compound annually.
(ii) If a deposit is Rs. 2000 or more but less than 6000 and for 2 or more years, the interest rate is
7 percent compounded annually.
(iii) If a deposit is more than Rs. 6000 and is for 1 year or more, the interest rate is 8 percent
compounded annually.
(iv) On all deposits for 5 years or more , the interest is 10 percent compounded annually.
(v) On all other deposits not covered by above conditions , the interest is 3 percent compounded
annually.
Given the amount deposited and the number of years , WAP to calculate the money in the
customers account at the end of the specified time.
7) WA menu driven program for the following :
Input is a character (letter) & output identifies the options given in menu).

*******************************************
Menu :
A - Upper (Capital) or Lower (Small) case.
B - Consonant or vowel
C - Quit
*******************************************
Enter your option :
Note :
If option 3 is chosen then a further question would be asked as :
Are you sure (Y/N) ?
Then depending on the user input (Y/N/y/n) the menu would be re-executed or terminated.
8) Write a program for the following series (using any loop) :
-5 5 -4 4 -3 3 -2 2 -1 1
9) . WA menu driven program to cater to the following options:
MENU (Rectangle)
1. Perimeter
2. Diagonal
3. Area
4. Quit
Enter your choice.
10) WAP to output the sum of positive numbers, sum of negative numbers, sum of even numbers,
sum of odd numbers from a list of numbers entered by the user. The list terminates when the
number entered is zero.
********************
HAPPY HOLIDAYS
********************

You might also like