(c语言)超级简单用for方法! 摘要:解题思路:注意事项:每一次循环记得要恢复初始值参考代码:#include<stdio.h>int main(){ int n,m,b,c,d,e,sum=1,i,j,k; scanf("%d",&n)…… 题解列表 2024年11月16日 0 点赞 0 评论 635 浏览 评分:9.9
使用递归完成解题,代码清晰可读 摘要:解题思路:使用函数递归,返回两个数值,分别是空水瓶数和已购水瓶数,当空水瓶数=2时,返回值加1(如题所述),<2时,直接返回代码结构如下:注意事项:在编写代码途中,需要注意适当增加变量保存水瓶数,如变…… 题解列表 2024年11月16日 1 点赞 0 评论 365 浏览 评分:9.9
会1就看我这个,看我注释修改进行了 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main() { int a[20]; int i, j, min, temp; for (i =…… 题解列表 2024年11月17日 0 点赞 0 评论 321 浏览 评分:9.9
2791: 计算邮资 摘要:解题思路:注意事项:单字符用char,注意单个字符要用单引号括起来,字符串要用双引号。还要用ceil函数来解决大于1000克但小于一个500克的计数单位。参考代码:#include<bits/stdc…… 题解列表 2024年11月17日 0 点赞 0 评论 533 浏览 评分:9.9
超级简略版 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main() { int a=15,b=25,h,y=150; float m; h=y*2/a; m=(a+b)*h/2.0…… 题解列表 2024年11月17日 1 点赞 0 评论 815 浏览 评分:9.9
1480 模拟计算器 初学者一定能懂 摘要:解题思路:用强制转换把ch转换成int类型注意事项:需要理解强制转换的定义,括号里面的是需要转换到的数据类型。e.g #include <stdio.h> int main() …… 题解列表 2024年11月17日 3 点赞 0 评论 646 浏览 评分:9.9
1796: 蛇形填数 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int n, a[150][150];void twins(i…… 题解列表 2024年11月18日 0 点赞 0 评论 492 浏览 评分:9.9
筛排处理,气死我了这题!!! 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){ // 定义变量a和数组d,其中d的大小为1…… 题解列表 2024年11月18日 0 点赞 1 评论 257 浏览 评分:9.9
这个不是答案!!!但是这个非常好玩,建议去玩一下,增加兴趣 摘要:解题思路:学到后面突然想起来这道题了注意事项:参考代码:#include <stdio.h>int main() { int a,t,x=0; scanf("%d",&a); while(a!=0){…… 题解列表 2024年11月18日 2 点赞 0 评论 539 浏览 评分:9.9
1054: 二级C语言-计算素数和(最简单的求法) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;bool add(int n){ int t=1; for(int…… 题解列表 2024年11月18日 0 点赞 0 评论 1049 浏览 评分:9.9