โ Back to Printing
Question 24
Right-Align a Number
Right-Align a Number
An alignment value in an interpolation pads a value to a width. Print 42 right-aligned in a width of 5 (so 3 spaces then 42) using {42,5}:
42Expected Output:
42
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.