//PROGRAM TO FIND THE GREATEST NUMBER AMONG THREE
/*MADE BY KRISHNA AGARWAL*/
#include<iostream>
using namespace std;
int main()
{
int a,b,c;
float k;
cout<<"enter the marks of english\n";
cin>>a;
cout<<"enter the marks of hindi\n";
cin>>b;
cout<<"enter the value of maths\n";
cin>>c;
if(c>b)
{
if(c>a)
cout<<"student score highest in maths\n";
}
else
if(b>a)
cout<<"student score highest in hindi\n";
else
cout<<"student score highest in english\n";
k=(a+b+c)/3 ;
cout<<"the % scored is\t\n "<<k;
return 0;
}
/*MADE BY KRISHNA AGARWAL*/
#include<iostream>
using namespace std;
int main()
{
int a,b,c;
float k;
cout<<"enter the marks of english\n";
cin>>a;
cout<<"enter the marks of hindi\n";
cin>>b;
cout<<"enter the value of maths\n";
cin>>c;
if(c>b)
{
if(c>a)
cout<<"student score highest in maths\n";
}
else
if(b>a)
cout<<"student score highest in hindi\n";
else
cout<<"student score highest in english\n";
k=(a+b+c)/3 ;
cout<<"the % scored is\t\n "<<k;
return 0;
}
No comments:
Post a Comment