Given three variables, k, m, n, of type int that have already been declared and initialized, write some code that prints each of them left-justified in a 9-position field on the same line.

Given three variables, k, m, n, of type int that have already been declared and initialized, write some code that prints each of them left-justified in a 9-position field on the same line.

LANGUAGE: C++

CHALLENGE:

Given three variables, k, m, n, of type int that have already been declared and initialized, write some code that prints each of them left-justified in a 9-position field on the same line. For example, if their values were 27, 987654321, -4321, the output would be:

|27xxxxxxx987654321-4321xxxx

NOTE: The vertical bar,  | , on the left above represents the left edge of the print area; it is not to be printed out. Also, we show x in the output above to represent spaces– your output should not actually have x’s!

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days – Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level