班上有学生若干名,给出每名学生的年龄(整数),求班上所有学生的平均年龄,保留到小数点后两位。 摘要:解题思路:注意事项:参考代码: #include<stdio.h>int main(){ int n,i,z; double sum=0; scanf("%d",&n); for(i=1;i<=n;i…… 题解列表 2023年11月16日 0 点赞 0 评论 422 浏览 评分:2.0
2794: 求平均年龄 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<iomanip> using namespace std; int main() { int n…… 题解列表 2023年11月11日 0 点赞 0 评论 461 浏览 评分:0.0
2794: 求平均年龄 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n; double b,c; cin>>n; for…… 题解列表 2023年11月05日 0 点赞 0 评论 274 浏览 评分:0.0
C语言思路简单,易懂!!! 理解万岁 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main (){ int n; scanf ("%d",&n); double aver=0,a; f…… 题解列表 2023年10月25日 1 点赞 0 评论 586 浏览 评分:9.9
2794:求平均年龄 摘要:注意事项:最后命令结果为浮点数时,要将表达式中n*1.0转化为浮点类型参考代码:#include<stdio.h>int main(){ int n,i,age,sum=0; scanf(…… 题解列表 2023年08月27日 0 点赞 2 评论 1503 浏览 评分:9.9
题解 2794: 求平均年龄 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define N 100int main(){ int n, age[N]; int i, sum=0; float…… 题解列表 2023年08月17日 0 点赞 0 评论 402 浏览 评分:6.0
求平均年龄 摘要:解题思路:注意事项:参考代码: double a,sum,b,num; cin>>a; if(a>=1.0 && a<=100.0){ sum=0; for (in…… 题解列表 2023年07月28日 0 点赞 0 评论 357 浏览 评分:0.0
感谢支持,谢谢你们的支持 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int n,age,sum=0 ; cin>>…… 题解列表 2023年07月01日 0 点赞 0 评论 396 浏览 评分:0.0
求平均年龄 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int n,sum=0,age; cin>>n…… 题解列表 2023年07月01日 0 点赞 0 评论 297 浏览 评分:0.0
编写题解 2794: 求平均年龄 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int n ; int sum=0 ; …… 题解列表 2023年06月17日 0 点赞 0 评论 556 浏览 评分:6.0