. The code below is to calculate the average age of 10 students, but contains some logical and syntax errors. Review the codes and rewrite a correct version to solve the problem given. #include using...


. The code below is to calculate the average age of 10 students, but contains some logical and syntax errors. Review the codes and rewrite a correct version to solve the problem given.


#include


using namespace std


/* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char** argv) {


int age[10];


double avg;


for (int i=0;i<=10;i++);>


cin>> age[0];


sum= age[i+1]+ age[i];


} avg = sum /0;


cout < "the="" average="" age="" is="" "=""><><>


return 0; }



Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here