C语言考试练习题_一元二次方程 (C++代码) 摘要:解题思路: int d = b*b-4*a*c; 1. d等于0,则两个根相等并等于负的2a分之b, 2. d大于0,则两个根不等,带入公式(-b-sqr…… 题解列表 2017年11月27日 3 点赞 0 评论 1352 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题6.4 (C语言代码) 摘要:解题思路:注意事项:这道题最关键的就是那两个long long ,错一般都在这,亲身体验参考代码:#include <stdio.h>int main(){ int n; long lon…… 题解列表 2017年11月27日 0 点赞 0 评论 977 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题6.2 (C语言代码) 摘要:解题思路:注意事项:这道题的错误点在于输出的顺序,要按照题目要求先后输出。参考代码:#include <stdio.h>int main(){ char ch; int a=0, b=0,…… 题解列表 2017年11月27日 0 点赞 0 评论 864 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题8.4 (C语言代码) 摘要:#include <stdio.h> int main() { int a[3][3],b[3][3],i,j; for(i=0;i<3;i++) for(j=0;j<3;j++) …… 题解列表 2017年11月28日 1 点赞 0 评论 1053 浏览 评分:0.0
Hello, world! (C语言代码) 摘要:#include <stdio.h> int main() { int a[100],i=0,m; while(scanf("%d",&a[i])!=EOF) { i++; …… 题解列表 2017年11月28日 1 点赞 0 评论 1063 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题7.1 (C语言代码) 摘要:解题思路:定义一个长度为n+1的数组,全赋值为1;将所有下角标为2的倍数的赋值为0;将所有下角标为3的倍数的赋值为0,依此类推;输出数值为1的单元的下角标;注意事项:参考代码:#include<std…… 题解列表 2017年11月28日 0 点赞 0 评论 816 浏览 评分:0.0
回文数字 (Java代码) 摘要:解题思路:用StringBuffer的reverse()方法判断回文数就比较简单了注意事项:参考代码: import java.util.Scanner; public class Main …… 题解列表 2017年12月02日 0 点赞 0 评论 987 浏览 评分:0.0
A+B for Input-Output Practice (I) (C语言代码) 摘要:#include<stdio.h> int main() { int a,b; while(scanf("%d%d",&a,&b)==2) printf("%d\n",a+b); …… 题解列表 2017年11月28日 1 点赞 0 评论 774 浏览 评分:0.0
分糖果 (C++代码) 摘要:#include<iostream> using namespace std; int a[105]; int b[105]; bool f(int a[],int n) { for(i…… 题解列表 2017年11月28日 8 点赞 0 评论 3021 浏览 评分:0.0
A+B for Input-Output Practice (V) (C语言代码) 摘要:#include <stdio.h> int main() { int a,m,sum,n; /*n定义几行,m定义算几个数;*/ scanf("%d",&n); while(n…… 题解列表 2017年11月28日 3 点赞 0 评论 1017 浏览 评分:0.0