The 3n + 1 problem (C语言代码) 摘要:解题思路:注意事项:相信很多人踩雷在了 当输入的n>m的情况上了参考代码:#include <stdio.h>#include <string.h>int main(){ int n,m,i,…… 题解列表 2019年04月18日 0 点赞 0 评论 447 浏览 评分:0.0
[编程入门]自定义函数处理素数 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int fun(int n){ int i; for(i=2;i*i<=n;i++) if(n%i==0) return 0;…… 题解列表 2019年04月18日 0 点赞 0 评论 640 浏览 评分:0.0
开心的金明 (C++代码) 摘要:解题思路:注意事项: 直接递归会超时,用上状态转移参考代码:#include<bits/stdc++.h>using namespace std;const int N = 25;int v…… 题解列表 2019年04月18日 0 点赞 0 评论 686 浏览 评分:0.0
2006年春浙江省计算机等级考试二级C 编程题(2) (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>double fact(double k){ int i; double a=1; for(i=1;i<=k;i++) a=a*i; r…… 题解列表 2019年04月18日 0 点赞 0 评论 969 浏览 评分:0.0
C语言训练-素数问题 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,n,k=0; scanf("%d",&n); for(i=2;i<n;i++) { if(n%i=…… 题解列表 2019年04月18日 0 点赞 0 评论 678 浏览 评分:0.0
C语言训练-计算1~N之间所有奇数之和 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,n,k=0,sum=0; scanf("%d",&n); for(i=1;i<=n;i++) { …… 题解列表 2019年04月18日 0 点赞 0 评论 655 浏览 评分:0.0
DNA (C语言代码)有几个特别重要的注意事项!!!! 摘要:解题思路:没啥特别的思路。。。就是循环输出和数组存储!注意事项:1,是大写‘X’而不是小写‘x’; 2,每组输出之间输出一个‘\n’; 3,输入是多组一起输入,而不是输…… 题解列表 2019年04月18日 0 点赞 0 评论 1017 浏览 评分:0.0
C语言考试练习题_保留字母 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int i,k,j; char a[80]; gets(a);; k=str…… 题解列表 2019年04月19日 0 点赞 0 评论 915 浏览 评分:0.0
[编程入门]宏定义之闰年判断 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define LEAP_YEAR(y)int main(){ int y; scanf("%d",&y); if(y…… 题解列表 2019年04月19日 1 点赞 0 评论 920 浏览 评分:0.0
C语言训练-求素数问题 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,i,k,j; scanf("%d",&n); for(i=2;i<n;i++) { k=0; f…… 题解列表 2019年04月19日 0 点赞 0 评论 669 浏览 评分:0.0