Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

oblem Statements on Topic-Decision Control Statement,Loop Statment( while ,for,do..

while) and switch stateme


Sr.No. Problem Statement
The current year and the year in which the employee joined the organization are entered through the keyboard. If the
number of years for which the employee has served the organization is greater than 3 then a bonus of Rs. 2500/- is given to
1
the employee. If the years of service are not greater than 3, then the program should do nothing.

In a company an employee is paid as under: If his basic salary is less than Rs. 1500, then HRA = 10% of basic salary and DA =
2 90% of basic salary. If his salary is either equal to or above Rs. 1500, then HRA = Rs. 500 and DA = 98% of basic salary. If the
employee's salary is input through the keyboard write a program to find his gross salary.
Write a program to calculate the salary as per the following table:

Write a program to check whether a triangle is valid or not, when the three angles of the triangle are entered through the
4
keyboard. A triangle is valid if the sum of all the three angles is equal to 180 degrees.
An Insurance company follows following rules to calculate
premium.
(1) If a person’s health is excellent and the person is between
25 and 35 years of age and lives in a city and is a male
then the premium is Rs. 4 per thousand and his policy
amount cannot exceed Rs. 2 lakhs.
(2) If a person satisfies all the above conditions except that
the sex is female then the premium is Rs. 3 per thousand
5 and her policy amount cannot exceed Rs. 1 lakh.
(3) If a person’s health is poor and the person is between 25
and 35 years of age and lives in a village and is a male then the premium is Rs. 6 per thousand and his policy
cannot exceed Rs. 10,000.
(4) In all other cases the person is not insured.
Write a program to output whether the person should be
insured or not, his/her premium rate and maximum amount
for which he/she can be insured.

In a company, worker efficiency is determined on the basis of the time required for a worker to complete a particular job. If
the time taken by the worker is between 2 – 3 hours, then the worker is said to be highly efficient. If the time required by
the worker is between 3 – 4 hours, then the worker is ordered to improve speed. If the time taken is between 4 – 5 hours, the
6
worker is given training to improve his speed, and if the time taken by the worker is more than 5 hours, then the worker has
to leave the company. If the time taken by the worker is input through the keyboard, find the efficiency of the worker.

The policy followed by a company to process customer orders


is given by the following rules:
(a) If a customer order is less than or equal to that in stock
and has credit is OK, supply has requirement.
(b) If has credit is not OK do not supply. Send him
7 intimation.
(c) If has credit is Ok but the item in stock is less than has
order, supply what is in stock. Intimate to him data the
balance will be shipped.
Write a C program to implement the company policy.

Write a program to calculate overtime pay of 10 employees. Overtime is paid at the rate of Rs. 12.00 per hour for every
8 hour worked above 40 hours. Assume that employees do not work for fractional part of an hour.

A machine is purchased which will produce earning of Rs. 1000 per year while it lasts. The machine costs Rs. 6000 and
will have a salvage of Rs. 2000 when it is condemned. If 12 percent per annum can be earned on alternate investments
9 what would be the minimum life of the machine to make it a more attractive investment compared to alternative
investment?

"Write a program to find the grace marks for a student. The user should enter the class obtained by the student and the
number of subjects he has failed in.
a) If the student gets third class and the number of subjects he failed in is greater than 3, then he does not get any grace. If
the number of subjects he failed in is less than or equal to 3 then the grace is of 5 marks per subject.
10 b) If the student gets second class and the number of subjects he failed in is greater than 2, then he does not get any grace.
If the number of subjects he failed in is less than or equal to 2 then the grace is of 4 marks per subject.
c) If the student gets first class and the number of subjects he failed in is greater than 1, then he does not get any grace. If
the number of subjects he failed in is equal to 1 then the grace is of 5 marks.
"
Calculate and display the income tax payable by a person when annual income is given for the following conditions-

11

Write a program in C to calculate and print the Electricity bill of a given customer. The customer id., name and unit consumed
by the user should be taken from the keyboard and display the total amount to pay to the customer. The charges are as
follows:

Unit Charge/unit
12 upto 199 @1.20
200 and above but less than 400 @1.50
400 and above but less than 600 @1.80
600 and above @2.00
If bill exceeds Rs. 400 then a surcharge of 15% will be charged and the minimum bill should be of Rs. 100/-

Write a C program to display grades accordingly marks.(for e.g,if marks obtained is less than 40 then display fail,if marks is in
13 between 40 to 59 then display C grade,if marks is in between 60 to 74 then B grade ,if marks is in between 75 to 90 then A
grade and marks in between 90 to 100 then A+ grade otherwise display invalid using else if ladder
Write a C program to perform arithmetic operations based on user choice. first read two integer numbers from user and
14
operator symbol e.g +,-,*,/.based on user choice perform arithmetic operation and display result using else if ladder
Write a program to calculate areas of different shape according to the given choice. 1.Circle 2.Triangle 3.Rectangle 4.Square
15
using else if ladder
16 Write a c program to check whether a triangle is equilateral or not(hint:A triangle is Equilateral triangle if all sides are equal)
17 Write a C program to enter cost price and selling price of a product and check for any profit or loss using else if ladder
18 Write a C program to find reverse of any number using while loop
19 Write a C program to check whether a number is Armstrong number or not using while loop
20 Write a C program to display fibonacci series upto n number of terms using do...while loop
21 Write a C program to find factors of any number using for loop
22 Write a C program to calculate sum of natural numbers using for loop
23 Write a C program to check whether number is prime or not using for loop
24 Write a C program to display table of given number using do....while loop
Write a C program to display following pattern
1
22
25
333
4444
55555
Write a C program to display following pattern
*****
26 ****
***
**
27 Write a C program to check given number is perfect number or not using loop
28 Write a C program to check whether the character is vowel or consonents using switch
Write a program to read two number & perform the following operations using switch case
1. Addition
2. Subtraction
29 3. Multiplication
4.Division
5.Reminder
Enter your choice:------
Write a program to read a number & check it for even/odd, positive/negative number using switch case
30 1. Even or Odd
2. Positive or Negative
31 Write a program to read character for shape and display the area of Circle,Triangle,Rectangle and Square using switch case
c.Circle
Write a C program to display following patterns using nested loop
*
* *
32 * * *
* * * *
* * * * *

33 Write a C program to add all the numbers entered by a user until user enters 0. (using do-while loop)

Problem Statements on 3 Topic-Array


Sr.No. Problem Statement
Write a C program to read x & y coordinate values of a point & display where it lies.(First , Second, Third, Fourth Quadrant,
1 Origin, On X axis, Y-axis)

Twenty-five numbers are entered from the keyboard into an


array. The number to be searched is entered through the
2
keyboard by the user. Write a program to find if the number to
be searched is present in the array and if it is present, display
the number of times it appears in the array.

Twenty-five numbers are entered from the keyboard into an


array. Write a program to find out how many of them are
3 positive, how many are negative, how many are even and how
many odd.

10 students are standing in a queue according to roll numbers to take admission, find out following information:
a) After taking admission one student left the queue from front, display the roll numbers of the students standing in queue
4 after this change.
b) One student at end position left the queue without taking admission, display the roll numbers of the students standing in
queue after this change.
A kid has two square boxes having 9 compartments in each box. He has kept coins in these 9 compartments of two boxes.
a) Take the information of amount stored in each compartment of two boxes.
b) Tell him the total amount in each compartment, if he adds money from each compartment of first box into the
5 respective compartment of another box.

Write a C Program to read 5 numbers from user and display the sum and difference between the adjacent elements.

Write a C Program to copy the one array elements to another elements.


Write a menu driven program demonstrating arrays using switch.
1.Input
8 2.Display
3.Search an element
4.Exit
Write a program to read size of an array from the user and read array elements. Display Array, Sum, Average of array
9
elements, Largest & smallest number in an array.
10 Write a program to read matrix elements from user and display the transpose of the matrix
11 Write a program to read two matrices A & B and calculate Addition & Subtraction matrix as C & D. Display all Matrices.
12 Write a program to read two matrices values from user and multiply two matrices.

You might also like