Sunteți pe pagina 1din 3

SET -1

1. A user wants to calculate his/her age. Implement a code for accepting date of birth from user and
then display his/her age, number of months and days. Using functions
Example:
Enter your date of birth (DD/MM/YYYY): 02/06/1987
Current Date: 23/10/2019

## Hey you are 32 years 4 months and 21 days old. ##

2. Implement a code for accepting N number of inputs from user. Find the inputs that are repeated
more than one time & display all that repeated numbers along with count. Finally remove that
numbers from list and display remaining numbers in sorting order.

SET -2

3. AP state announces new electricity charge from Jan-2019. There are three different categories of
people are living in AP state. They are General(G),OBC(O),SC/ST(S). The AP state announces an
electricity charges based on categories.
 If the person belonging for SC/ST no charges up-to 50 unit, free per month. From after 50
to 100 those charge 1 rupee 75 paisa per unit
 If the person belonging for OBC, Then electricity charges as like
o up to 100 units they charge 1 rupee 25 paisa per unit
o From after 100 units, for every 10 units they charge 50 rupee up to 200 units
o From after 200 units to 500 units, they charge 75 paisa per unit
 If the person belonging for General, Then electricity charges as like
o up to 100 units, they charge 2 rupee 15 paisa per unit
o From after 100 units, for every 50 units they charge 75 rupee up to 200 units
o From after 200 units to 500 units, they charge 75 paisa per unit
Implement a code to calculate the electricity bill for different people.

4. Using function implement a code to accept an N number of inputs from user then store accepted
inform, ask a one more input from user and find this input number weather user given or not using
binary search technique.
SET -3

5. Write a program to display the following figure for n number of lines.

1 2 1

1 2 3 2 1

1 2 3 4 2 1

6. There are 10 Employees working in an organization. Where basic salary of each employee is 15000.
They are joined in different years in that organization and now the management wants to increase
the salaries for employees based on employee’s experience.
 If the employee have less than 3 years’ experience, then the salary increment will be 10%
amount from his/her basic salary after deducting of salary-tax.
 If the employee was working form since 3 years then the salary increment will be 15%
amount from his/her basic salary after deducting of salary-tax.
 If the employee was working form since 5 years then the salary increment will be 25%
amount from his/her basic salary after deducting of salary-tax.
 If the employee having experience is more than 5 years and less than 10 years then the
salary increase 35% amount from his/her basic salary after deducting of salary-tax.
 If the employee having experience more than 10 years and less than 25 years then the
salary increment will be 45% amount from his/her basic salary after deducting of salary-tax
and house rent allowance up-to 5% his salary.
 Basically the management deducting salary-tax 10% amount form every employee basic
salary.
Implement a C code for above scenario to calculate each employee salary and total salary
expensive for one month and Annam. Display the all employee salary in decreasing order.

SET -4

7. Implement a code to accept N numbers from user and then count how many similar integers are
there in user input. Display number of occurrence of each number & display all accepted numbers
in increasing order.

8. Implement a code accepting N number of input from user only if the user input is divisibly by 3 or 8
&then store it otherwise skip that input. Finally your stored information length is equal to N.
Display the final information in sorting order using selection sort technique.

9. Implement a cod for accepting a number from user then finding sum of digits and count the
number of digits in that input using recursive functions.
SET -5

10. Write a program to find the total sales of each employee & the total sales of each product.
Available data are the sale figure of 10 employees of 6 months & of 5 types of products. Using
Arrays

11.

There are three customer James, David and Ronald, their recharge with one year details are
James was done recharge with 299, 149, 51, 1999, 349, 98, 198, 101, 398 and 999
David was done recharge with 98,509,448, 149, 799, 101, 399, 198, 509, 299 and 198
Ronald was done recharge with 149, 999, 299, 799, 198, 509, 198, 449 and 49

Implement a code for sorting the James, David and Ronald information using Insertion sort
technique and display sorted information among all customer as well find customer name who are
spend highest amount for recharge throughout one year.

12. Write a program to calculate the amount of telephone bill as per the following:
Rs. 50 up to 99 calls,
50 paise will be charged in between 99 calls and 199 calls,
again 75 paise will be charged above than 199 calls and up to 299 calls,
and more than 300 calls the charges will be applied as Rs. 1 for each call.

S-ar putea să vă placă și