In a C++ program you need to store the identification numbers of 10 employees (a
ID: 3843235 • Letter: I
Question
Explanation / Answer
A) Define two arrays that may be used in parallel to store the 10 identification numbers and gross pay amounts.
const int [SIZE] = 10;
int idNumbers[SIZE];
double grossPay[SIZE];
Write a loop that uses these arrays to print each employee’s identification number and weekly gross pay.
for (int ctr = 0; ctr < SIZE; ctr++)
{
cout << idNumbers[SIZE] << “ “ << “$” << grossPay[SIZE] << fixed << setprecision(2) << endl;
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.