Calculate Library Fine in C++ – C# Programming Example
Basic C++

Calculate Library Fine in C++

Library Fines ,this program was created to solve Library Fines problem.

The fee structure is as follows:

  1. If the book is returned on  before  5 days, no fine will be charged.
  2. If the book is returned after the expected return day (between 5 and 10 days) – fine: 0.5$ per day
  3. If the book is returned after the expected return day (between 10 and 30 days) fine: 1$ per day
  4. If the book is not returned after 30 days, cancel membership. fine: 1.5$ per day

Code:

This example was prepared to teach variable and comparison operations.

You can find more similar examples of programming for this programming language in the site.

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: