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

There are three int variables name cfidl, cfia2, and cfia3, containing CUNYFirst

ID: 3703820 • Letter: T

Question

There are three int variables name cfidl, cfia2, and cfia3, containing CUNYFirst id values. These values range from 0 to 99999999 (eight digits).Write a single statement that displays the values of these variables on standard output as follows: they each appear on a separate line, they are indented by two tabs, they are printed, right-justified in a field of eight positions, and are padded on the left by zeros. So, it 44556677, and 123456 respectively, they would appear like this: 00000987 44556677 00123456

Explanation / Answer

You have not specified the programming language. I have given the answer for C, C++ and Java language

Answer for C programming language:
=======================
printf(" %08d %08d %08d ", cfid1, cfid2, cfid3);

Answer for C++:
================
cout << right << setfill('0') << " " << setw(8) << cfid1 << " " << setw(8) << cfid2 << " " << setw(8) << cfid3 << endl;


Answer for Java programming language:
======================================
System.out.printf(" %08d %08d %08d ", cfid1, cfid2, cfid3);

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