1. 求平均年龄
来源:互联网 发布:最优化理论视频 编辑:程序博客网 时间:2024/04/29 23:25
班上有学生若干名,给出每名学生的年龄(整数),求班上所有学生的平均年龄,保留到小数点后两位。
21817
17.50
#include<stdio.h>
int main()
{
int n,m,i;
double sum=0;
scanf("%d\n",&n);
for(i=0; i<n; i++)
{
scanf("%d",&m);
sum+=m;
}
printf("%.2lf\n",sum/n);
return 0;
}
阅读全文
0 0
- 1. 求平均年龄
- 1001 求平均年龄
- 01:求平均年龄
- 01:求平均年龄
- ACM java求平均年龄
- 题目1128:求平均年龄
- 题目1128:求平均年龄
- 题目1128:求平均年龄
- 题目1128:求平均年龄
- POJ 2714:求平均年龄
- 题目1128:求平均年龄
- 题目1128:求平均年龄
- Problem A: 求平均年龄
- Problem A: 求平均年龄
- Problem B: 求平均年龄
- Problem A: 求平均年龄
- 百练 2714 求平均年龄
- poj 百练 2714:求平均年龄
- linux wget
- 什么在推动用户的硬件革新?——安迪-比尔定律(Andy and Bill’s Law)简介
- 第五大周总结
- android 生成xml以及xml解析
- [LeetCode] 475. Heaters
- 1. 求平均年龄
- 400字重写深度学习的知识框架
- C语言中的int类型
- eggjs&sequelize使用教程一(环境搭建)
- windows 7 x64 下的 System Call
- 基于Tcp&UDP协议的简单Socket通信实例(JAVA)
- S5PV210启动详解
- Opatch及PSU下载地址
- QQ第三方联合登录视频教程