1143: C语言训练-素数问题 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n,flag=0; scanf("%d",&n); for(int i=2;i…… 题解列表 2021年11月29日 0 点赞 0 评论 415 浏览 评分:9.9
还是用列表来解决 摘要:解题思路:注意事项:参考代码:n = int(input())fenzi = [2]fenmu = [1]for i in range(1,n+1): fenzi.append(fenzi[i-…… 题解列表 2021年11月29日 0 点赞 0 评论 236 浏览 评分:0.0
优质题解 实现自定义函数(超级详细) 摘要:解题思路: 首先通过拆分,可分为以下几步: 1.实现fact()函数 ,完成阶乘 阶乘可以看成1*2*3*..*n, 其中由1到n可以借用循环变量,…… 题解列表 2021年11月29日 0 点赞 13 评论 3764 浏览 评分:9.0
C语言字符串反转(全网最短了) 摘要:解题思路:简单粗暴直接反转注意事项:从len-1开始反循环遍历参考代码:#include<stdio.h>#include<string.h>int main(){ char a[1000]; …… 题解列表 2021年11月28日 0 点赞 0 评论 400 浏览 评分:0.0
利润计算 -编译通过无误 摘要:解题思路:按照题目意思逐步写代码即可注意事项:参考代码:#include<stdio.h>int main(){ int n,m;//n为利润,m为应发奖金 scanf("%d",&n); if(n<…… 题解列表 2021年11月28日 0 点赞 0 评论 316 浏览 评分:0.0
找规律再求和 摘要:解题思路:发现他跟斐波那契数列有关,先斐波那契数列再调用注意事项:参考代码:#include<stdio.h>int fabonacia(int n){ if(n==1||n==2) return 1…… 题解列表 2021年11月28日 0 点赞 0 评论 311 浏览 评分:5.0
c++计算圆周率代码 摘要:解题思路:利用迭代法计算圆周率注意事项:注意精度参考代码:#include<iostream>#include<iomanip>using namespace std;int main() { dou…… 题解列表 2021年11月28日 0 点赞 0 评论 1581 浏览 评分:7.4
1124:大小写问题 C语言 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){ char a[101]; int len; gets(a); len=s…… 题解列表 2021年11月28日 0 点赞 0 评论 262 浏览 评分:0.0
直接暴力出奇迹 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i; for(i=1;i<=2000;i++) //1993符合,到2000就合适了 …… 题解列表 2021年11月28日 0 点赞 0 评论 279 浏览 评分:0.0
剪刀石头布 摘要:解题思路:利用if进行枚举,其余情况输出0注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b; …… 题解列表 2021年11月28日 0 点赞 0 评论 469 浏览 评分:4.0