Answer to Question #228762 in C++ for Themba

Question #228762
Given the following declaration:
int j;
int sum;
float sale[10][7];
which of the following correctly finds the sum of the elements of the fifth row of sale?
1. sum = 0;
for(j = 0; j < 7; j++)
sum = sum + sale[5][j];
2. sum = 0;
for(j = 0; j < 7; j++)
sum = sum + sale[4][j];
3. sum = 0;
for(j = 0; j < 10; j++)
sum = sum + sale[5][j];
4. sum = 0;
for(j = 0; j < 10; j++)
sum = sum + sale[4][j];
1
Expert's answer
2021-08-23T18:32:37-0400

2. sum = 0;

for(j = 0; j < 7; j++)

sum = sum + sale[4][j];



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS