Skip to main content

Record to Report Row

Challenge on lesson: Checkpoint: Input & Output

Implement void report_row(const char* line) that parses <item> <count> <price> (e.g. "bolt 12 0.05") and prints one row: `` | bolt | 12 | 0.05 | ` Item left-aligned width 12; count right-aligned width 3; price with exactly 2 decimals, right-aligned width 5. Spaces around |` exactly as shown.

Difficulty: beginner

Back to lesson: Checkpoint: Input & Output