Nested if-else to solve Library Fine

Photo by Luke Brugger on Unsplash

Out of Free Stories? Here is my Friend Link.

Library Fine

Your local library needs your help! Given the expected and actual return dates for a library book, create a program that calculates the fine (if any). The fee structure is as follows:

  1. If the book is returned on or before the expected return date, no fine will be charged (i.e.: fine=0).