Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project # 3 - branching - library fines calculator Assignment Content This Project requires concepts inclusive of Chapters 1 - 3 . You must use

Project #3- branching - library fines calculator
Assignment Content
This Project requires concepts inclusive of Chapters 1-3.
You must use branching (Chapter 3) and variables with correct data types and format specifiers (Chapter 2).
Careful attention to detail on format is very important for this project. Please reference the example output provided.
You have been hired by Tulsa County library to write a C program to calculate library fines.
The program will ask the user for the value of the book, how many days a book was borrowed as agreed, as well as how many days the book was actually kept. The difference
between those will be the number of days the fine will be calculated on (the fine must be capped at the price of the book).
Fines are as follows:
1 to 7 days =50 cents per day
8 to 21 days =$1.25 per day
21 to 30 Days =$2.25 per day
31 days and beyond $4 per day
Welcome to the Tulsa County library fine calculator
Please enter price of the book: 39.99
Please enter agreed days borrowed: 7
Please enter days kept: 9
Agreement was 7 days but book kept for 9 days, fine for 2 days is $1.00
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PC Magazine Guide To Client Server Databases

Authors: Joe Salemi

1st Edition

156276070X, 978-1562760700

More Books

Students also viewed these Databases questions

Question

What role does the decision criterion play in a hypothesis test?

Answered: 1 week ago

Question

How to defuse hostile, potentially violent employees and customers

Answered: 1 week ago