字符逆序 (C语言代码) 摘要:/*字符逆序; strlen; 是一个标准库函数。功能:计算字符串s的长度,但是不包括'\0'在内。 当头文件包含了 #include <string.h> 该函数就能使用…… 题解列表 2017年11月30日 1 点赞 0 评论 1440 浏览 评分:0.0
成绩转换 (C语言代码) 摘要:解题思路:从上往下排除注意事项:参考代码:#include<stdio.h>int main(){ int n; while(scanf("%d", &n) != EOF) { if(n > 100…… 题解列表 2017年11月30日 0 点赞 0 评论 826 浏览 评分:0.0
时间转换 (C语言代码) 摘要:#include <stdio.h> int main() { int t,h,m,s; scanf("%d",&t); h=t/3600; m=(t-h*3600)/60; …… 题解列表 2017年11月30日 5 点赞 1 评论 979 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题7.5 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main (){ int a[10],i,j; for (i = 0;i <= 9;i++) { scanf("%d",&a…… 题解列表 2017年11月30日 0 点赞 0 评论 913 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题6.7 (C语言代码) 摘要:解题思路: 很明显1不是完数设i为2代表起点小于等于N的for循环,1一定是任何完数的因子,而完数的因子不包括本身,设j为内循环故要小于i。我觉得下面代码思路清晰可以参考下…… 题解列表 2017年11月30日 1 点赞 0 评论 1289 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题6.6 (C语言代码) 摘要:解题思路:水仙花问题可以借助for循环轻松解得注意事项:参考代码:#include<stdio.h>#include<math.h> int main(){ int i,j,c,t=0,g=0,h; …… 题解列表 2017年11月30日 2 点赞 0 评论 1098 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题3.7 (C++代码) 摘要:解题思路:注意事项:#include<iostream>using namespace std;int main(){ int a,b; while(cin>>a>>b)cout<<(a+…… 题解列表 2017年11月30日 0 点赞 0 评论 927 浏览 评分:0.0
printf基础练习2 (C语言代码) 摘要:解题思路:注意事项:有前缀方式printf("%#o",num) //有前缀o的8进制数printf("%#x",num) //有前缀0x的小写16进制数printf("%#X",num) //有…… 题解列表 2017年11月30日 0 点赞 0 评论 689 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)【正解】 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void main(){ printf("**************************\n"); printf("H…… 题解列表 2017年11月30日 1 点赞 0 评论 750 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题6.8 (C语言代码) 摘要:解题思路:下一个数等于前两个数的和。注意事项:1.int的数据要提升类型要强制转化。(float)a/b2.使用变量本身来进行值的传递,不用再多使用一个变量。类似的a,b交换数值。a:1;b:2;a …… 题解列表 2017年11月30日 4 点赞 0 评论 716 浏览 评分:0.0