CJCoding With Joseph

Left-Align a Word in a Field

Print the word Hi left-aligned in a field 8 characters wide, immediately followed by a |. The output is:

Hi      |

That is Hi, then 6 spaces, then the bar.

Expected Output:

Hi      |
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.