2544:N以内累加求和(使用到for循环) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(int argc, char *argv[]) { int N,i; int sum=0; sca…… 题解列表 2024年12月07日 0 点赞 0 评论 402 浏览 评分:10.0
循环的嵌套 处理 输入与输出 摘要:解题思路:通过两层循环达到输入二维数组以及输出二维数组的效果,从而达到二维数组转置的效果。注意事项:在使用printf输出时,注意目标所需要的效果,即space,换行。参考代码:#include <s…… 题解列表 2024年12月08日 1 点赞 0 评论 378 浏览 评分:10.0
编写题解 2794: 求平均年龄 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int n,sum=0; cin>>n; …… 题解列表 2024年12月08日 1 点赞 2 评论 410 浏览 评分:10.0
编写题解 1765: 循环入门练习2 摘要:解题思路:注意事项:注意这道题有两种解法参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int sum=0;for(int…… 题解列表 2024年12月08日 1 点赞 2 评论 157 浏览 评分:10.0
编写题解 2797: 最高的分数 摘要:解题思路:本题使用打擂台法解决注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ long long n;cin>>n; …… 题解列表 2024年12月08日 1 点赞 0 评论 186 浏览 评分:10.0
对角线求和 摘要:解题思路:首先,通过两个嵌套的 for 循环,从用户获取一个 3×3 的整数矩阵的值,并存储在二维数组 arr 中。然后,通过另外两个 for 循环分别计算主对角线(左上角到右下角)元…… 题解列表 2024年12月08日 5 点赞 0 评论 658 浏览 评分:10.0
6行代码解决求和训练 摘要:解题思路:注意事项:参考代码:a, b, c = map(int, input().split())A = sum(range(1, a+1)) # 计算1到a的自然数之和B = sum([i**2…… 题解列表 2024年12月08日 1 点赞 3 评论 560 浏览 评分:10.0
筛选N以内的素数c语言 摘要:参考代码:#include <stdio.h> int main() { int N,i,j; scanf("%d",&N); for(i=2;i<=N;i++) { int…… 题解列表 2024年12月08日 8 点赞 0 评论 1372 浏览 评分:10.0
C语言 指针解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main ( ){ int n=0 ; int a[110]={0} ; int *p=a ; …… 题解列表 2024年12月08日 1 点赞 0 评论 373 浏览 评分:10.0
C语言之自由下落的距离计算建模是精髓 摘要:#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { int m,n; float…… 题解列表 2024年12月09日 2 点赞 0 评论 616 浏览 评分:10.0