Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

c++ help! Given three variables , k , m , n , of type int that have already been

ID: 3666154 • Letter: C

Question

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

|xxxxxxx27987654321xxxx-4321

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!

Explanation / Answer

#include <iostream>
using namespace std;
int main() {
int k= 27,m=987654321,n=-4321;
cout << " " << k << " " << m << " " << n << end1;
return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote