#include <stdio.h>
#include <conio.h>
void main()
{
struct stuscore
{
char name[20];
float score[5];
float average;
}x;
int i;
float sum;
char rep;
while(1)
{
printf("
Do you want to continue?(Y/N) ");
rep=getche();
if(rep=='N'||rep=='n'){
printf("
End");
break;
}
sum=0;
printf("
Input name(as Fan_youyi) and 5 scores(all depart by space);
");
scanf("%s",x.name);
for(i=0;i<5;i++)
scanf("%f",&x.score[i]);
for(i=0;i<5;i++)
sum+=x.score[i];
x.average=sum/5;
printf("The averrage score of %s is %4.1f
",x.name,x.average);
}
}