Math, asked by namaniyashaswini, 5 months ago

A library charges 10 paise for the first day and
5 paise for each additional day that a book is
overdue. If the borrower paid 65 paise for late
charges, for how many days was the book
over due ?
please answer this question ​

Answers

Answered by imrachitraj2004
3

Answer:

include<stdio.h>

#include<conio.h>

int main()

{

int days;

float fine;

printf("Enter the number of days: ");

scanf("%d", &days);

if (days > 0 && days <= 5)

fine = 0.50 * days;

if (days >= 6 && days <= 10)

fine = 1 * days;

if (days > 10)

fine = 5 * days;

if (days > 30)

{

printf("Your membership would be canceled.\n");

}

printf("You have to pay Rs. %.2f fine.", fine);

}

Output:

Enter the number of days: 5

You have to pay Rs. 2.50 fine.

Enter the number of days: 10

You have to pay Rs. 10.00 fine.

Enter the number of days: 13

You have to pay Rs. 65.00 fine.

Enter the number of days: 31

Your membership would be canceled.

You have to pay Rs. 155.00

Answered by pmurali735
1

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.

Step-by-step explanation:

pls follow me and mark me as Brainliest

Similar questions