Sign InCreate Account

Upgrade to Pro

Upgrade Now

Coding Workspace

EditorProjectsPractice QuestionsTimed Mock ExamsFlowcharts

PseudoEditor AI

Pseudocode TutorCode GeneratorCode FixerCode Converter
Back to Problems
PreviousNext

Sign in to run tests against edge cases and save your code automatically.

Problem Description

Easy

Library Fine Calculator

PROExam Style
Selection & Logic
Arithmetic

A library charges $0.50 per day for a book that is up to 7 days late, and $1.00 per day for every day after that (e.g. 8 days late = 7 * 0.50 + 1 * 1.00 = 4.50). Write a program that inputs the total number of days late and outputs the total fine.

Example Input

8

Example Output

4.5

Success Rate:

0% (0 passed / 0 attempted)

Code

Draft auto-saved

Test Results

Click "Test Code" to evaluate your code against the tests.

Product

For SchoolsOverviewFeaturesFAQ
PseudoEditor

© 2026 PseudoEditor. All rights reserved.