CJCoding With Joseph

Pad a Number with Leading Zeros

The variable n holds 42. Print it padded with leading zeros to 5 digits:

00042

Use the D5 format specifier.

Expected Output:

00042
Topics:
Printing
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.