C Coding Aignment
C Coding Aignment
Output
Objective
16. Write a program in C to calculate and print the Electricity
bill of a given customer. The customer id and unit consumed by
the user should be taken from the keyboard and display the
total amount to pay to the customer.
upto 199------------1.20
200-500-------------1.80
Above 500----------2.00
If bill exceeds Rs. 400 then a surcharge of 15% will be charged
and the minimum bill should be of Rs. 1
INPUT
Output
Objective
17. A library charges a fine for every book returned late. For first 5 days
the fine is 50 paisa, for 6-10 days, fine is one rupee and above 10 days,
fine is 5 rupees. If you return the book after 30 days your membership
will be cancelled. Write a program to accept the number of days the
member is late to return the book and display the fine or appropriate
message.
Input
Output
Objective
18. Write a program to find the factorial of any number
Input
Output
Objective
19. Write a program to print Fibonacci sequence 0 1 1 2 3 5 8
13…… N terms and prints the sum of sequence
Input
Output
Objective
20. Write a program in C to accept an integer numbers and find
sum of digits
Input
Output
Objective
21. Write a program in C to accept an integer numbers and find
reverse of this number and check this number for palindrome
Input
Output
Objective
22. Write a program in C to accept an integer numbers and to
check a number is Armstrong or not
Input
Output
Objective
23. Write a program in C to accept an integer numbers and to
check a number is Perfect or not
Input
Output
Objective
24. Write a program to find the sum of following series: S =
2+4+6+8+……………N terms
Input
Output
Objective
25. Write a program to check a number whether it is prime
number or not
Input
Output
INDEX
S.NO Program Date of Date of Remarks
experiment invigilation