C语言程序设计教程(第三版)课后习题8.3 (C语言代码)(标记法) 摘要:解题思路:用标记法来判断素数,通过返回函数值到主函数来输出结果注意事项:注意循环的使用,和函数值返回参考代码:#include<stdio.h> int f(int a); int main() …… 题解列表 2017年11月26日 2 点赞 0 评论 1038 浏览 评分:0.0
优质题解 Manchester-字符串的输入输出处理 摘要:解题思路:1.有n+个待输入字符串;前面n个有空格,后面的字符串没有空格 (即后面:D O T CPP是四个字符串);2.因为前面n个字符串原样输出,先用for循环输入( 用gets() )前n个字符…… 题解列表 2017年11月26日 76 点赞 79 评论 14564 浏览 评分:8.9
校门外的树 (C语言代码) 摘要:解题思路:我们只需要用数组模拟一下即可。参考代码:#include <stdio.h> #include <string.h> int main() { int l, m; …… 题解列表 2017年11月25日 1 点赞 0 评论 1069 浏览 评分:0.0
Manchester- A+B for Input-Output Practice (VII) 摘要:解题思路:在1085 题的基础上,再输出一个换行符;下面(1085)#include<stdio.h> int main() { int a,b; while(scanf("%d%d"…… 题解列表 2017年11月25日 16 点赞 0 评论 1375 浏览 评分:8.0
Manchester-A+B for Input-Output Practice 摘要:解题思路:类似1089题,多输出一个换行符;下面(1089)#include<stdio.h> int main() { int n,n1,a,sum=0; scanf("%d",&n);…… 题解列表 2017年11月25日 18 点赞 2 评论 2658 浏览 评分:9.9
优质题解 字符串的修改 (C++代码) 摘要:解体思路:贪心对字符串 A 的增删改都会导致操作次数 + 1,所以只需找出字符串 B 中能够对应到字符串 A 中的字符数目(即不需改动的字符),用 A.Length() - count 即可求得。注意…… 题解列表 2017年11月25日 5 点赞 9 评论 4212 浏览 评分:7.0
IP判断 (C语言代码) 摘要:解题思路:注意事项:参考代码:int Jude(char *s){ int x=0; for(;*s;s++) { if(*s=='.') x=0; else if(*s>=&…… 题解列表 2017年11月25日 0 点赞 0 评论 852 浏览 评分:0.0
IP判断 (C语言代码) 摘要:解题思路:注意事项:参考代码:int Jude(char *s){ int x=0; for(;*s;s++) { if(*s=='.') x=0; else if(*s>=&…… 题解列表 2017年11月25日 0 点赞 0 评论 1138 浏览 评分:0.0
printf基础练习2 (C语言代码) 摘要:#include<stdio.h>int main(){int a; printf("\n请输入一个整数,不超过10^9:"); scanf("%d",&a); printf("转换…… 题解列表 2017年11月25日 0 点赞 0 评论 1035 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题8.1 (C语言代码)(一般方法:辗转相除法) 摘要:解题思路:注意辗转相除时的变量的转换就可注意事项:参考代码:#include<stdio.h> int gcd(int a,int b); int lcm(int a,int b); int m…… 题解列表 2017年11月25日 2 点赞 0 评论 1322 浏览 评分:0.0