CJCoding With Joseph

Split Cents into Dollars and Cents

Declare int totalCents = 1234. Split it into whole dollars and leftover cents, then print the amount in the exact format below:

$12.34

Expected Output:

$12.34
Topics:
Variables
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.