string matrix addition to get answer of type double

// Hi , Program is to get the final marks based on the following formula.
// I get an error that it cannot multiply grades[i][1] ... with the constants.
// Any hints on how to get final??
// Thanks.
const double Assigmnt1_PORTION = 0.05;
const double Assigmnt2_PORTION = 0.05;
const double Assigmnt3_PORTION = 0.05;
const double PROJECT_PORTION = 0.15;
const double LAB1_PORTION = 0.1;
const double LAB2_PORTION = 0.1;
const double MIDTERM_PORTION = 0.2;
const double FINAL_PORTION = 0.3;
string grades[max][max];
double final;
void main()
for(int i=0;i<=b;i++)
{
final=Assigmnt1_PORTION*grades[i][1]+Assigmnt2_PORTION*grades[i][2]+Assigmnt3_PORTION*grades[i][3]+LAB1_PORTION*grades[i][4]+LAB2_PORTION*grades[i][5]+PROJECT_PORTION*grades[i][6]+MIDTERM_PORTION*grades[i][7]+FINAL_PORTION*grades[i][8];
grades[i][9]=final;
if(final>=90&&final<=100)
{
grades[i][10]='A';
grades[i][11]=4.0;
grades[i][12]='Pass';
grades[i][13]="Excellent";
}
}
Topic archived. No new replies allowed.