循环控制--1.求平均年龄 摘要:解题思路: 刚开始用了数组,大小是10,我说怎么出错了呐。一看题目是1<=n<=100。这个题不用数组就很方便,for循环里面输进去一个数,然后加到sum上。注意事项:sum必须设为float型;参考…… 题解列表 2023年03月24日 0 点赞 0 评论 153 浏览 评分:0.0
2794: 求平均年龄 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long long n; double b=0…… 题解列表 2024年01月08日 0 点赞 0 评论 134 浏览 评分:0.0
题解 2794: 求平均年龄(c++) 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int n; cin>>n; int s…… 题解列表 2024年01月09日 0 点赞 0 评论 181 浏览 评分:0.0
求平均年龄 2794: 摘要:解题思路:#include <iostream>using namespace std;int main(){ int n; double sum =0; cin>>n; fo…… 题解列表 2024年01月09日 0 点赞 0 评论 115 浏览 评分:0.0
求平均年龄 摘要:解题思路:注意事项:参考代码: double a,sum,b,num; cin>>a; if(a>=1.0 && a<=100.0){ sum=0; for (in…… 题解列表 2023年07月28日 0 点赞 0 评论 181 浏览 评分:0.0
感谢支持,谢谢你们的支持 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int n,age,sum=0 ; cin>>…… 题解列表 2023年07月01日 0 点赞 0 评论 269 浏览 评分:0.0
求平均年龄 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int n,sum=0,age; cin>>n…… 题解列表 2023年07月01日 0 点赞 0 评论 171 浏览 评分:0.0
题解 2794: 求平均年龄 摘要:解题思路:注意事项:可以用两种输出格式参考代码:方法一:#include <bits/stdc++.h>using namespace std;int main(){ int sum,m; …… 题解列表 2024年01月15日 0 点赞 0 评论 166 浏览 评分:0.0
编写题解 2794: 求平均年龄 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; cin >> n; int sum = …… 题解列表 2024年02月05日 0 点赞 0 评论 142 浏览 评分:0.0
编写题解 2794: 求平均年龄 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main() { int n; scanf("%d", &n); int a[n]; for (int…… 题解列表 2023年04月25日 0 点赞 0 评论 190 浏览 评分:0.0