结构体之时间设计(简单C语言) 摘要:解题思路:1月到12月没什么规律,所以用个数组来累加,累加玩后在month>=3月开始判断是闰年与否,是的话sum++注意事项:参考代码:#include<stdio.h>#include<stdli…… 题解列表 2023年10月14日 0 点赞 0 评论 146 浏览 评分:0.0
三个数字的排序 摘要:#include using namespace std; int main(){ int a[3]; for(int i=0;i>a[i]; } sort(a,a+3…… 题解列表 2023年10月14日 0 点赞 0 评论 146 浏览 评分:0.0
2909: 直方图 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;long long tong[10000];int main(){ int …… 题解列表 2023年10月14日 0 点赞 0 评论 144 浏览 评分:0.0
2974: 统计字符数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int tong[200];int main(){//输入随机个数字 cha…… 题解列表 2023年10月14日 0 点赞 0 评论 277 浏览 评分:0.0
题解 2974: 统计字符数 摘要:解题思路:首先,观察题目,就本题分成几个任务:第一个任务:输入字符串。我们可以发现,本题中输入的变量(字符)的数量是不固定的,用普通的循环无法完成,就需要一种特殊的方法。while(cin>>c)//…… 题解列表 2023年10月14日 0 点赞 0 评论 324 浏览 评分:0.0
白细胞计数(OwO) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<math.h> int main() { int n; scanf("%d",&n); doubl…… 题解列表 2023年10月14日 0 点赞 0 评论 214 浏览 评分:0.0
结构体之成绩记录 摘要:解题思路:注意事项:参考代码:#include<stdio.h>typedef struct DATA{ char Numb[100]; char Name[20]; int sco…… 题解列表 2023年10月14日 0 点赞 0 评论 124 浏览 评分:0.0
用动态规划求解爬楼梯 摘要:解题思路:#include<iostream>using namespace std;int dp[30];//dp数组表示到i阶梯的总的方案数//则第i个可能有i-1上来,或者i-3上来 int m…… 题解列表 2023年10月14日 0 点赞 0 评论 203 浏览 评分:0.0
结构体之成绩统计2(c语言) 摘要:解题思路:用一个整型数组储存每个学生的成绩总分,比较出最高的,再用k记录下标,然后输出注意事项:参考代码:#include<stdio.h>typedef struct DATA{ char N…… 题解列表 2023年10月14日 0 点赞 0 评论 187 浏览 评分:0.0
带参数宏定义,交换数值 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define Swap(x,y,t) (t=x,x=y,y=t) int main(){ int a,b,c; scanf…… 题解列表 2023年10月15日 0 点赞 0 评论 140 浏览 评分:0.0