Write an algorithm to read the date borrowed and present date.

A video club rents video for three days. Write an algorithm to read the date borrowed and the present date; calculate the number of days borrowed. If the number of days exceeds three days, compute the number of days overdue and overdue charge. Use a rate of $1.50 for everyday overdue or part overdue

Questions by jovan

Showing Answers 1 - 0 of 0 Answers



Set dateBarrowed as Date
Set todayDate as Current Date
Set duration as integer
Set overDueFee as Double
Print "Enter barrowed Date:"
read dateBarrowed
set duration as the difference of dateBarrowed from todayDate
if duration is greter than 3
    duration=duration-3
    overDueFee=duration*1.50
Print overDueFee

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions