Write a program using Switch case for the following :-
Enter name of the member and number of days returned late. Library charges fine for books returned late according to the following
1.
First five days. rs 2. per day
6 to 10 days. rs 4 per day
Above 10 days. rs 6 per day
Calculate the fine assuming that a book is returned n days late and display name of the member,
total fine and number of days returned late in tabular format.
Answers
Answer:
A library charges a fine for every book returned late. For first 5 days the fine is 50 paise per day, for 6-10 days fine is one rupee per day and above 10 days fine is 5 rupees per day. 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 appropriate message.
Explanation:
A library charges a fine for every book returned late. For first 5 days the fine is 50 paise per day, for 6-10 days fine is one rupee per day and above 10 days fine is 5 rupees per day. 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 appropriate message.