Computer Science, asked by Taris2438, 1 year ago

Program in c++ to get 3 marks and find the grade based on the average

Answers

Answered by Anonymous
2
#include<iostream.h>

#include<conio.h>

void main()
{
int a,b,c;
cout<<"Enter marks of three subjects ";
cin>>a>>b>>c;

float avg;
avg = (a+b+c)/2;

if(avg>50)
{
cout<<" Grade D";
}

else if (p<60&&p>=50)
{
cout<<"Grade C";
}

else if(p<80&&p>=60)
{
cout<<"Grade B";
}

else if
{
cout<<"Grade A";
}

getch();
}
Similar questions