#include<iostream>
#include<conio.h>
using namespace std;
main()
{
 int g1,g2,g3;
 float ave;
 
  cout<<"Enter the first grade: ";
  cin>>g1;
 
  cout<<"Enter the second grade: ";
  cin>>g2;
 
  cout<<"Enter the third grade: ";
  cin>>g3;
 
  ave=(g1+g2+g3)/3;
 
 cout<<"The average of the grades is "<<ave<<endl;
 
}
 
No comments:
Post a Comment