#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.1fn\",x.name,x.average);
}
} 继续阅读与本文标签相同的文章
上一篇 :
用Python十行代码轻松搞定PS修图
下一篇 :
甘特更新企业敏捷规划工具的魔力象限
-
超干货!奇点云《数智商业论坛》金句频出,引爆首日云栖大会
2026-05-18栏目: 教程
-
阿里董事局主席张勇:大数据和算力就是数字经济时代的石油和发动机
2026-05-18栏目: 教程
-
阿里云服务器(Ubuntu)--查看固定程序的进程
2026-05-18栏目: 教程
-
微服务消息队列(MQTT For IoT)Android Demo使用介绍
2026-05-18栏目: 教程
-
禁用 WebDAV 禁用危险的 HTTP 方法
2026-05-18栏目: 教程
