Highest Marks program in CPP Language

Highest Marks checking in programming?


#include<iostream>
#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();
}

Output Result



Comments

Popular posts from this blog

Even/Odd Number Checking Code in CPP

Calculating Name and Marks in Cpp

Triangle of Characters(CPP)