题解 | #计算平均成绩#
计算平均成绩
http://www.nowcoder.com/practice/30a28eb88c3f4e87be1a5b397ddd6fe2
又是一道简单题~~~
#include<iostream> #include<stdio.h> using namespace std; int main() { int a,b,c,d,e; cin>>a>>b>>c>>d>>e; int sum=a+b+c+d+e; double avg=sum*1.0/5; printf("%.1f",avg); return 0; }
点个赞再走吧,谢谢~~