C语言程序设计教程(第三版)课后习题6.4 (C语言代码) 摘要:解题思路: 用fac函数来求阶乘,在主函数中把从1到n的阶乘加起来注意事项:参考代码:#include<stdio.h>int fac(int n){ int i,t=1; f…… 题解列表 2018年01月27日 0 点赞 0 评论 1146 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题1.6 (C语言代码) 摘要:解题思路:null注意事项:null参考代码:#include<stdio.h>int main(void){ int a,max; scanf("%d",&max); for(int i=1;…… 题解列表 2018年01月27日 0 点赞 0 评论 872 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题6.2 (C语言代码) 摘要:解题思路:这道题有两种方法来做。我是用数组存储字符串。首先贴上我的AC代码#include<stdio.h>int main(){ char s[100]={0}; int lette…… 题解列表 2018年01月26日 0 点赞 0 评论 1026 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题5.4 (C语言代码) 摘要:解题思路:先用if...else比较a ,b的大小,然后用a ,b比较得到的max与c比较,然后输出注意事项:参考代码:#include <stdio.h>int main(){ int a, …… 题解列表 2018年01月26日 0 点赞 0 评论 627 浏览 评分:0.0
简单的a+b (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c; scanf("%d%d",&a,&b); c=a+b; print…… 题解列表 2018年01月26日 0 点赞 0 评论 580 浏览 评分:0.0
IP判断 (利用scanf返回值巧解) 摘要:解题思路:利用scanf读取成功时和失败以及文件结尾时的不同返回值来分支判断注意事项:文件结尾为EOF (-1)scanf返回读取成功的变量的数量 有输入,但全部失败时返回0; 读取文…… 题解列表 2018年01月26日 0 点赞 1 评论 620 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题7.3 (C语言代码) 摘要: 解题思路:菜鸟一枚,在做了二十多道题之后,首次遇到迭代问题我是拒绝的,当我把题目做完后真的打开了我做迭代问题的思路。其实很简单,首先定义一个x0当做 x[n],定义一个x1当做x[n+1],然…… 题解列表 2018年01月26日 0 点赞 0 评论 837 浏览 评分:0.0
【计算球体积】 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define pi 3.1415int main(){ double r,v; while(scanf("%lf",&r) == 1)…… 题解列表 2018年01月26日 5 点赞 0 评论 1136 浏览 评分:0.0
蓝桥杯历届试题-翻硬币 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <strings.h>int main(){ char str1[100],str2[100]; int…… 题解列表 2018年01月26日 0 点赞 0 评论 867 浏览 评分:0.0
难在1(C语言代码) 摘要:解题思路:注意“1‘’不是素数,大家应该会了。注意事项:随便把1搞出去就行了。参考代码:#include<stdio.h>int isprime(int );int main(){ int n,m; …… 题解列表 2018年01月26日 0 点赞 0 评论 927 浏览 评分:0.0