格式错误,运行样式一样
1条回答 默认 最新
- 南七灵 2021-12-30 12:51关注
#include <stdio.h> int main(void) { int Excellent, Good, Medium, Pass, Fail; scanf("%d%d%d%d%d", &Excellent, &Good, &Medium, &Pass, &Fail); float a, b, c, d, e, h; printf("Rank Number Ratio\n"); printf("-----------------------\n"); printf("Excellent%7d%6.1f%%\n", Excellent, a = (float)Excellent / (Excellent + Good + Medium + Pass + Fail) * 100); printf("Good%12d%6.1f%%\n", Good, b = (float)Good / (Excellent + Good + Medium + Pass + Fail) * 100); printf("Medium%10d%6.1f%%\n", Medium, c = (float)Medium / (Excellent + Good + Medium + Pass + Fail) * 100); printf("Pass%12d%6.1f%%\n", Pass, d = (float)Pass / (Excellent + Good + Medium + Pass + Fail) * 100); printf("Fail%12d%6.1f%%\n", Fail, e = (float)Fail / (Excellent + Good + Medium + Pass + Fail) * 100); printf("-----------------------\n"); printf("Total%11d%6.1f%%\n", Excellent + Good + Medium + Pass + Fail, h = (float)(a + b + c + d + e)); return 0; }
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 关于温度改变石墨烯介电性能(关键词-介电常数)
- ¥150 HDMI分路器LT86102 的输出在890MHz频点处EMC超标8DB
- ¥15 druid(相关搜索:数据库|防火墙)
- ¥15 大一python作业
- ¥15 preLaunchTask"C/C++: aarch64- apple-darwin22-g++-14 生成活动 文件”已终止,退出代码为-1。
- ¥60 如何鉴定微信小程序数据被篡改过
- ¥18 关于#贝叶斯概率#的问题:这篇文章中利用em算法求出了对数似然值作为概率表参数,然后进行概率表计算,这个概率表是怎样计算的呀
- ¥20 C#上传XML格式数据
- ¥15 elementui上传结合oss接口断点续传,现在只差停止上传和继续上传,各大精英看下
- ¥20 手机截图相片分辨率降低一半