#include<iostream>
#include<iomanip>
//int findScore(char *name[],int *p2,int n);
void main()
{
using namespace std;
char *name[]={"Smith","John","Mary","Harvard","Kai"};
int score[]={87,89,72,96,66};
char nam[10];
cout<<"请输入姓名:";
cin>>nam;
for (int i=0;i<5;i++)
{
if (strcmp(nam,name[i])==0)
{
cout<<nam<<"的分数为"<<score[i]<<endl;
break;
}
if (i==5)
cout<<"不存在该名学生"<<endl;
}
}