Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help with this programming problem, could you please help? Write a C++ pr

ID: 3763917 • Letter: I

Question

I need help with this programming problem, could you please help?

Write a C++ program that computes student grades for an assignment a percentage given each student's score and the total points. the final score should be rounded up to the nearest whole value using the ceil function in the <cmath> header file. You should have a function to print the last name of the student and another function to compute and print the percentage as well as "Excellent" if the grade is better than 90, "Well Done" if the score is greater than 80, "Good" if the score is greater than 70, "Need Improvement" if the grade is greater than or equal to 60, and "Fail" if the grade is less than 50. The main function is resposible for reading the input file and passing the appropriate arguments to your functions.

Explanation / Answer

Answer :

#include<iostream.h>

#include<cmath.h>

int main()
{
  
   int mark[5], i;
   float sum=0,percentage=0;
   cout<<"Enter marks obtained in 5 subjects :";
   for(i=0; i<5; i++)
   {
       cin>>mark[i];
       sum=sum+mark[i];
   }
   percentage=sum/5;
   cout<<"Your Grade is ";
   if(percentage>90)
   {
       cout<<"Excellent";
   }
   else if(percentage<=90 && percentage>80)
   {
       cout<<"Well Done";
   }
   else if(percentage<=80 && percentage>70)
   {
       cout<<"Good";
   }
   else if(percentage>=60 && percentage<=70)
   {
       cout<<"Need Improvement";
   }
   else
   {
   cout<<"Fail";
   }
return 0;
}