I need help rewriting my if-else statements into a switch statement,
//equations for final grade
LGT=(LG1+LG2+LG3+LG4)/40.*.40*100;
MTPG=MTP*.4;
MTEG=(MTE/55.)*.20*100;
sum=LGT+MTPG+MTEG;
if(sum>95) //if-else statements, determines final grade
letter='A';
else if(sum>85)
letter='B';
else if(sum>75)
letter='C';
else if(sum>65)
letter='D';
else
letter='F';
cout<<"final grade is: "<<letter<<endl;
also i need to somehow get my switch statement to notify the user with the following two cases: If their mid-term Grade is a “D”, ‘You are in danger of failing this course. Please see the Professor’ If their mid-term Grade is a “F”, ‘You are in failing this course. Your Advisor has been notified. Please see both your advisor and the Professor’