CJCoding With Joseph
15free / daySign inCreate account

Mini Receipt Table

Build a tiny two-row table using tabs to line up the columns. The first printf prints the header row with the words Item, Qty, and Price separated by tabs. The second printf prints a data row with Pen, the number 3, and the price 1.50 (formatted to two decimal places) separated by tabs. This combines \t for columns, \n for line breaks, and %.2f for money formatting in one small program.

Expected Output:

Item	Qty	Price
Pen	3	1.50

= newline. The output ends with a newline — print one after the last line.

Hints2 available
Topics:
Printing
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (p, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.