新手简单快速解决!!! 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n = 0, x = 0, y = 0; cin …… 题解列表 2023年11月05日 0 点赞 0 评论 297 浏览 评分:0.0
宏定义之闰年判断 摘要:解题思路:在这题中使用定义宏的方法比使用定义函数的方法更简单注意事项:#define 定义常量和宏注意 #define 后面没有分号;#define 常量名 常量值#define 宏名 宏表达式参考代…… 题解列表 2023年11月05日 0 点赞 0 评论 253 浏览 评分:0.0
自定义函数判断闰年 摘要:解题思路:注意事项:参考代码:#include <stdio.h> int is_prime_year(int x) { if((x%4==0&&x%100!=0)||x%400==0)…… 题解列表 2023年11月05日 0 点赞 0 评论 273 浏览 评分:9.9
for循环c语言版 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int Y; float M,R; scanf("%f %f %d",&R,&M,&Y); …… 题解列表 2023年11月04日 0 点赞 0 评论 324 浏览 评分:0.0
利用等差数列求和公式解题 摘要:解题思路:利用等差数列求和公式,sn=na1+n(n+1)/2 * d注意事项:天冷了,请多穿衣服。参考代码://等差数列#include <stdio.h>int main(){ int n…… 题解列表 2023年11月04日 0 点赞 0 评论 432 浏览 评分:9.9
求偶数和标准方法 摘要:解题思路:定义数组储存数据,然后遍历,判断是否是偶数,累加。注意事项:请好好学习,谢谢;参考代码://求偶数和#include <stdio.h>int main(){ int i, n, su…… 题解列表 2023年11月04日 1 点赞 0 评论 470 浏览 评分:9.9
字符串分类统计 摘要:解题思路:注意事项:这段代码没有考虑输入字符串中的特殊字符、标点符号等情况。它只会统计字母、数字、空格和其他字符的个数。参考代码:#include <stdio.h> #include <strin…… 题解列表 2023年11月04日 0 点赞 0 评论 284 浏览 评分:9.9
for循环c语言版 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,n; int ax=1; scanf("%d %d",&a,&n); if(…… 题解列表 2023年11月04日 0 点赞 0 评论 477 浏览 评分:9.9
结构体之成绩记录(原始解法通俗易懂) 摘要:解题思路:原始解法,没有加任何指针或者链表。方便理解。注意事项:参考代码:#include<stdio.h>#include<string.h>struct Student { char id[128…… 题解列表 2023年11月04日 0 点赞 0 评论 283 浏览 评分:0.0
最大公约数与最小公倍数 摘要:解题思路:由于两个数的乘积等于这两个数的最大公约数与最小公倍数的积。所以,求两个数的最小公倍数,就可以先求出它们的最大公约数,然后用两个数的积除去最大公约数得出它们的最小公倍数。参考代码:#inclu…… 题解列表 2023年11月04日 0 点赞 0 评论 300 浏览 评分:0.0