# Calculate Grade Of Student Using C++

First of all, I would like to thank them for searching my article. The reason for that is so many articles but thank you so much for reading my article. Calculate Grade Of Student Using C++ We are going to know more about this very clearly through the article.

To calculate a student’s grade in C ++ programming based on his or her grades, you must ask the user to enter the marks you received in certain subjects.

To calculate student quality, first, calculate the score of all subjects and then calculate the average score. Start looking at the standards now to show the result as shown here in the following column.

## Calculate Grade of Student using C++

``````#include<iostream>
using namespace std;
int main()
{
int marks[5], i;
float sum=0,avg;

cout<<"\n Enter Marks of Student \n";
cout<<"------------------------------------";
cout<<"\n Hindi : ";
cin>>marks[0];
cout<<"\n English : ";
cin>>marks[1];
cout<<"\n Maths : ";
cin>>marks[2];
cout<<"\n History : ";
cin>>marks[3];
cout<<"\n Science : ";
cin>>marks[4];

for(i=0;i<5;i++)
{
sum=sum+marks[i];
}
cout<<"------------------------------------";
cout<<"\n Total Marks of Student = "<<sum;
avg=sum/5;
cout<<"\n Average = "<<avg;

if(avg>80)
{
cout<<"A";
}
else if(avg>60 && avg<=80)
{
cout<<"B";
}
else if(avg>40 && avg<=60)
{
cout<<"C";
}
else
{
cout<<"D";
}
return 0;
}``````