#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 ...
#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("\nDo you want to continue?(Y/N) ");
rep=getche();
if(rep=='N'||rep=='n'){
printf("\nEnd");
break;
}
sum=0;
printf("\nInput name(as Fan_youyi) and 5 scores(all depart by space);\n");
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\n",x.name,x.average);
}
}