Computer Science, asked by sharma8912, 1 year ago

. A library charges fine of returning the books late, the fines mentioned are as under :

First 5 days - 40 paise per day

6 to 10 days - 65 paise per day

Above 10 days - 80 paise per day

Design a program to calculate the fine assuming that books is returned N days late.

Answers

Answered by neha009
62

Answer:

double fine=0.0; int n;

printf("Enter the no of days late");

scanf("%d",&n);

if(n<=5)

fine=0.40*n;

else if(n<=10)

fine=0.65*n;

else

fine=0.80*n;

printf("Fine = %lf",fine);

Explanation:

above code snippet is written in c

the main logic starts from the if block you can use this in your own language.

hope it helps you!

Answered by ravikantsinha740
22

Answer:

see the attachment. hope it helpss.

Attachments:
Similar questions