C语言程序设计教程(第三版)课后习题5.6 (C语言代码) 摘要:解题思路:利用switch(表达式1){ case 常量表达式1: 语句1;break; case 常量表达式2: 语句2;break; case 常量表达式3: 语句3;break…… 题解列表 2017年09月18日 1 点赞 0 评论 1191 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题5.5 (C语言代码) 摘要:解题思路:对于三个条件的判断语句,我们采用if{……}else if{……}else 语句 注意事项:最后跳出判断语句输出y参考代码:#include<stdio…… 题解列表 2017年09月18日 3 点赞 2 评论 711 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题5.4 (C语言代码) 摘要:解题思路:利用两次双目运算符取求得最大值注意事项:双目运算符要书写正确temp=a>b?a:b; max=temp>c?temp:c;参考代码:#include<stdio.h>int main…… 题解列表 2017年09月17日 3 点赞 0 评论 1505 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题4.9 (C语言代码) 摘要:解题思路:华氏温度数值由浮点输入赋值给F,输出摄氏温度c,注意输出格式是%.2f,保留两位小数位注意事项:注意输出格式是%.2f参考代码:#include<stdio.h>int main(){ …… 题解列表 2017年09月17日 1 点赞 4 评论 470 浏览 评分:0.0
用筛法求之N内的素数。 (C语言代码) 摘要:#include<stdio.h>int main(){ int a,j,i,n,h=2; scanf("%d",&n);//输入N if(n>1) { printf("2\n"); for(…… 题解列表 2017年09月17日 0 点赞 0 评论 1760 浏览 评分:9.5
计算质因子 (C++代码) 摘要:参考代码:#include <iostream>#include <stdio.h>using namespace std;bool mark[1000];int prime[1000];int pr…… 题解列表 2017年09月16日 1 点赞 0 评论 2303 浏览 评分:6.3
打水问题 (C语言代码) 摘要:解题思路:贪心策略注意事项:参考代码:#include <stdio.h>int main(){ int a[100],b[10][100]={{0,0}}; int n,m,sum=0,t,i,j…… 题解列表 2017年09月16日 0 点赞 1 评论 1425 浏览 评分:6.0
C语言程序设计教程(第三版)课后习题1.5 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <cstdio>using name space;main(){ cout<<""}…… 题解列表 2017年09月15日 0 点赞 0 评论 817 浏览 评分:0.0
【出圈】 (C语言代码) 摘要:解题思路:利用指针取找最后留下来的数值,参见语句注释注意事项:参考代码:#include<stdio.h>int main(){ int i,n,m,*p,a[1000],k,l; //定义整…… 题解列表 2017年09月15日 4 点赞 0 评论 1009 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题8.3 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h> int isPrime(int num) { int i,flag=0; for(i=2;i<num;i++){ …… 题解列表 2017年09月14日 1 点赞 0 评论 958 浏览 评分:0.0