题解 | #总成绩和平均分计算#
总成绩和平均分计算
https://www.nowcoder.com/practice/0fa5132c156b434da4347ad051c4be22
#include <stdio.h> int main() { float n,sum=0; while(scanf("%f",&n) != EOF){ sum += n; } printf("%.2f %.2f",sum,sum/3); return 0; }
总成绩和平均分计算
https://www.nowcoder.com/practice/0fa5132c156b434da4347ad051c4be22
#include <stdio.h> int main() { float n,sum=0; while(scanf("%f",&n) != EOF){ sum += n; } printf("%.2f %.2f",sum,sum/3); return 0; }
相关推荐