字符串的修改(不使用strlen,用指针试试) 摘要:参考代码: ```c #include int main() { char a[201]; char b[201]; scanf("%s%s",a,b); char *p=a,…… 题解列表 2023年11月16日 0 点赞 0 评论 253 浏览 评分:4.0
最简单,没有之一 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>#include<math.h>using namespace std;int main(){ in…… 题解列表 2023年11月16日 0 点赞 0 评论 158 浏览 评分:0.0
多输入输出练习2(圆周率为3.1415) 摘要:参考代码: ```c #include # define PI 3.1415 int main() { int n; scanf("%d",&n); double r; fo…… 题解列表 2023年11月16日 0 点赞 0 评论 263 浏览 评分:0.0
C语言训练-最大数问题(易错点在于给max的初值,如果给max赋0的话,但给的数全是负数,0不在给的数之中,但是最后max会是0,只能先把给的第一个数赋给max) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int a,max; scanf("%d",&a); max=a; while(~sca…… 题解列表 2023年11月16日 0 点赞 0 评论 230 浏览 评分:0.0
明明的随机数(记得考虑多个相同的数连在一起的情况) 摘要:参考代码: ```c #include int main() { int n; scanf("%d",&n); int a[n]; for(int i=0;i…… 题解列表 2023年11月16日 0 点赞 0 评论 200 浏览 评分:0.0
通过数组标记 摘要:解题思路:用数组给每个人标号,将每次循环报3的人赋值0,直到只剩1个找到它的标号。参考代码:#include <stdio.h>// 函数pan用于找出最后剩下的一个元素int pan(int *a,…… 题解列表 2023年11月16日 0 点赞 0 评论 181 浏览 评分:0.0
甲流疫情死亡率嘿嘿嘿 摘要:解题思路:嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿注意事项:嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿参考代码:#include<bits/stdc++.h>using namespace std;int main(){ dou…… 题解列表 2023年11月16日 0 点赞 1 评论 398 浏览 评分:6.0
萌新出品 2758: 打印ASCII码 摘要:注意事项:记得给个好评参考代码:#include<iostream>using namespace std;int main(){ char a; cin>>a; cout<<(in…… 题解列表 2023年11月16日 0 点赞 0 评论 276 浏览 评分:6.0
2604: 砝码称重 摘要:# 思路 设有数组 dp[i][j],其中 dp[i][j]:当前的砝码为 i 时,是否能称出 j 重量的物品 当 dp[i][j] 时此时有三种情况: 1. 不放第 i 个砝码,此时…… 题解列表 2023年11月16日 0 点赞 0 评论 399 浏览 评分:9.9
班上有学生若干名,给出每名学生的年龄(整数),求班上所有学生的平均年龄,保留到小数点后两位。 摘要:解题思路:注意事项:参考代码: #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 评论 335 浏览 评分:2.0