โ Back to Printing
Question 242
Pad a Number with Leading Zeros
Pad a Number with Leading Zeros
The variablenholds 42. Print it padded with leading zeros to 5 digits: 00042 Use theD5format 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.