C语言程序设计教程(第三版)课后习题5.5 (C语言代码) 摘要:解题思路:级联的if-else if语句注意事项:参考代码:#include<stdio.h>int main(){ int x,y; scanf("%d",&x); if(x<1) y=x; el…… 题解列表 2018年09月17日 0 点赞 0 评论 661 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题9.6 (C语言代码) 摘要:解题思路:依次输出次数,换行,进位,应用for循环。注意事项:注意小数点位数,注意换行空格。参考代码:#include<stdio.h>int main(){int i;float s;scanf("…… 题解列表 2018年09月18日 0 点赞 0 评论 876 浏览 评分:0.0
母牛的故事 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>static int new1 = 1, year=0; // 静态变量 ,new1:一年可生产数, year=每年可新蹭生产数 st…… 题解列表 2018年09月18日 0 点赞 0 评论 1315 浏览 评分:0.0
汽水瓶 (C++代码) 摘要:解题思路: 先求出每一次能换几瓶子,用一个变量来记,然后再去求剩下的瓶子,如此重复,直到不瓶子不够3个注意事项:如果到最后刚好有两个瓶子要记得+1参考代码:#include<iostream> us…… 题解列表 2018年09月18日 1 点赞 0 评论 743 浏览 评分:0.0
蓝桥杯算法提高VIP-寻找三位数 (C语言代码)简单写法(暴力破解) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,d,e,f,g,h,k; int sum1=0,sum2=0,sum3=0; for( a…… 题解列表 2018年09月18日 0 点赞 0 评论 1050 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题5.6 (C语言代码) 摘要:解题思路:采用switch语句实现。注意事项:参考代码:#include<stdio.h>int main(){ int num; scanf("%d",&num); switch(num/10) {…… 题解列表 2018年09月18日 0 点赞 0 评论 665 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题5.7 (C语言代码) 摘要:解题思路:最常规的思路注意事项:参考代码:#include<stdio.h>int main(){ long int num; int a,b,c,d,e,place; scanf("%ld",&nu…… 题解列表 2018年09月18日 0 点赞 0 评论 851 浏览 评分:0.0
1850:判断第几天 (C语言代码),数组解决问题 摘要:回顾了一下这个题的原先解决思路,不能保证按此思路下去是否能作对这道题,于是另辟蹊径。解题思路: 就是闰年比较麻烦,需要先判断。我列了2个数组,一个是闰年的,一个不是闰年的。通过注意事项:编程时注意到以…… 题解列表 2018年11月16日 1 点赞 1 评论 1919 浏览 评分:0.0
求圆的面积 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main () { float a,r; …… 题解列表 2018年09月19日 0 点赞 0 评论 658 浏览 评分:0.0
C语言训练-"水仙花数"问题1 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std;int main(){ int a,b; int ge,shi,bai; cin>>a; b…… 题解列表 2018年09月19日 0 点赞 0 评论 652 浏览 评分:0.0