Computer Science, asked by MariaDanica, 6 months ago

A library charges fine for books returned late. following are the fines:
First 5 days : 40p per day
6 to 10days : 65p per day
Above 10 days : 80p per day

design a class in Java to calculate the fine assuming that a book is returned N days late.​
with output​

Answers

Answered by ashwani80825ps
0

ycyj ujccyrurur6dffuuvdjfvuvjjn

Explanation:

ez

Answered by kanugulanavya1527
1

Answer:

#include<stdio.h>

#include<conio.h>

int main()

{

int days;

float fine;

printf("Number of days late: ");

scanf("%d",&days);

if(days<=30)

{

if(days<=5)

fine=0.5;

else if(days>5&&days<=10)

fine=1;

else if(days>10&&days<=30)

fine=5;

printf("you have to pay fine of Rs %f",fine);

}

else

printf("Your membership has been canceled");

printf ("\n\nPress any key to close.");

getch ();

return 0;

}

Explanation:

okay!

Similar questions