Professional Documents
Culture Documents
2. Write a program (WAP) to assign the cost of two mobile phones and find their total cost.
3. Write a program (WAP) to input the cost of two mobile phones and find their total cost.
4. WAP to input the speed of 3 trains and calculate their sum and average.
5. WAP to input length and breadth to calculate the area of a rectangle.
Worksheet 2
1. WAP to interchange the values of two numbers using a third variable
2. Write a program to input and find the value of the following expression and then display the output
Z = (a5 + b2 – c9) / 2a
3. Write a program to accept the basic salary of a person and then print the total salary if
2. WAP to input the age of a person and find whether he is eligible to vote or not.
3. WAP to find whether a given number is odd or even
Worksheet 4
1. WAP to input the total amount in a bill if the amount is greater than 1000 then a discount of 100 is given, otherwise
no discount is given
2. WAP to input the size of a pizza. If the user chooses “m” display “Medium" else display “Large”.
3. WAP to input the income and expenses of an ice cream stall for the month of June. Check, if it is profit or loss
Worksheet 5
1. WAP to display the three given elective subject options for a student. If the student chooses the subject code,
display the respective Subject Name
Subject Subject
Code Name
1 Computer
2 Arts
3 Cookery
2. Write a program that will input the ID, weight and height of a student, and calculate their body mass index
3. WAP to input some amount in indian currency and then convert to different currency value based on the user’s
choice. Follow the table below
Choice Country’s Value
1 Rs. 60 = 1 $ (US)
2 Rs 102= 1 Pounds (UK)
3 Rs 9.68= 1 yuan (Chinese)
4 Rs 13.38= 1 Dinar (Kuwait)
4. A house owner must pay tax based on the value of the house. WAP to calculate the tax for the given criteria.
Worksheet 6
1. Write a program to input Name, Roll No and marks of five subjects. Overall Grade is assigned based on the
following
criteria:-
Average marks Grade
80% - 89% A
70% - 79% B
60% - 69% C
Below 60% D
3. A Textile industry has announced the following festival discounts on the purchase of items, based on the total cost
of the items purchased:
Total cost Discount
percentage
5%
Less than Rs. 2000
25%
Rs. 2001 to Rs.5000
35%
Rs. 5001 to Rs.10000
50%
Above Rs. 10000
Calculate the discount amount and the total amount to be paid by the customer.
Worksheet 8
1. WAP to accept 25 numbers and hence calculate & print sum of even and odd integers .
2. WAP that reads a positive integer from the user and counts the number of divisors of the given number.
3. WAP to input the total marks of 25 students in a class and then display the average marks of the class. Also print
the number of students in each of following range.
61 – 70, 71 – 80, 81 – 90, 91 – 100
Worksheet 9
1. Robotics is an organization with 100 employees. WAP to input the basic salaries of all th employees in the
organization & then print their gross and net salary.