C语言 选择顺序& 摘要:解题思路:见注释注意事项:参考代码:#include<stdio.h>int main(){ int nums[10]= { 0 }; for(int i=0;i<sizeof(nums)…… 题解列表 2022年10月16日 0 点赞 0 评论 444 浏览 评分:0.0
C语言新手,见丑了 摘要:解题思路:最麻烦但思路易理解注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c; int t; scanf("%d %d %d",&a,…… 题解列表 2022年10月16日 0 点赞 0 评论 512 浏览 评分:0.0
小菜鸟的解题思路,并非最佳解题思路也希望有大佬能够将上下循环联系在一起。 解题思路:首先是需要输出字符*需要用char()声明字符,再用scanf或者用getchar输入*。此时我们需要打印菱形*,首先我们需要打印空格二,一,零,一,二。*则是1,3,5,3,1。我们可以用for循环完成。注意事项:参考代码:#incubleintmain(){charc; 题解列表 2022年10月16日 0 点赞 0 评论 1356 浏览 评分:7.6
1097: 蛇行矩阵 摘要:>记录一下自己的写法 1.解题思路 样例输入 5 样例输出 1 3 6 10 15 2 5 9 14 4 8 13 7 12 11 首先我们先对数据进行分析,也就是寻找…… 题解列表 2022年10月16日 0 点赞 0 评论 671 浏览 评分:0.0
宏定义与自定义 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define arr_1(a,b,c) ((a>b)?a:b)>c?((a>b)?a:b):cfloat max(float l,f…… 题解列表 2022年10月16日 0 点赞 0 评论 750 浏览 评分:9.9
三目运算符简化闰年 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define LEAP_YEAR(y) (y%4==0&&y%100!=0||y%400==0)?'L':'N…… 题解列表 2022年10月16日 0 点赞 0 评论 1192 浏览 评分:9.7
宏定义三角简化 摘要:解题思路:宏定义函数求解注意事项:注意不要超出界限参考代码:#include<stdio.h>#include<math.h>#define a_1(a,b,c) (a+b+c)/2#define s…… 题解列表 2022年10月16日 0 点赞 0 评论 799 浏览 评分:6.0
彩票解题思路 摘要:解题思路:注意事项:参考代码:Scanner sc = new Scanner(System.in); int n = sc.nextInt(),cnt; int[] arr1 = new int…… 题解列表 2022年10月16日 0 点赞 0 评论 565 浏览 评分:9.9
宏定义与指针区别 摘要:解题思路:注意事项:参考代码:指针是访问 而宏定义是机械替换#include<stdio.h>#define swap(a,b){int temp;temp=a;a=b;b=temp}int main…… 题解列表 2022年10月16日 0 点赞 0 评论 726 浏览 评分:6.0
(【C++】数组)数字的处理与判断——一种思路 摘要:**以下是我的代码** ```cpp #include using namespace std; int main() { int num,wei; cin>>num; if(n…… 题解列表 2022年10月16日 0 点赞 0 评论 623 浏览 评分:0.0