In this code I am trying to calculate the test score forstudents using arrays in he formating part the compiler is notrecognizing the output though they have been declared pleasehelp
#include<iostream>
#include<iomanip>
#include<string>
using namespace std;
int main ()
{
int highest = 99;
const int size = 10;
int testscore1 [size] = {};
int testscore2 [size] = {};
int testscore3 [size] = {};
string student_name[10];
int Id;
//input student names and testscore values
for (int i=0;i<size; i++)
cout<<“please enter student_name”;
cin>> student_name[8];
cout<<“please enter Id”;
cin>>Id;
cout<< “what is the first score”;
cin>>testscore1 [0];
cout<<“what is second test score”;
cin>>testscore2 [0];
cout<<“what is the third test score”;
cin>>testscore3[0];
}
//Tcalculates the scores of each student
// calculate the average testscore
int setprecision;
i;
cout<<setw (18)<<“student_name[0]”;
cout<<setw (4)<<“testscore1[size]”;
cout<<setw (4)<<“testscore2[0]”;
cout<<setw (4)<<“testscore3[0]”;
cout<<setw(25<<fixed<<setprecision(2)))
cout<<setw (18″———“<<) )<<setw(4)”——-“<<setw
PayPal Gateway not configured
PayPal Gateway not configured