Highest Marks program in CPP Language
Highest Marks checking in programming?
#include<conio.h>
#include<string.h>
using namespace std;
int main()
{
int x[10];
char name[3][20];
for(int i=0;i<3;i++)
{
cout<<"enter marks ..";
cin>>x[i];
cout<<"enter name ..";
cin>>name[i];
}
int high=x[0];
int loc=0;
for(int i=1; i<3; i++)
{
if(high<x[i])
{
high=x[i];
loc=i;
}
}
cout<<"high =="<<high<<endl;
cout<<"name =="<<name[loc];
getch();
}
Comments
Post a Comment