
C语言程序设计(第二版)
文章平均质量分 74
gaoenbin626
目前大三求职实习java
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C语言程序设计(第二版)第3章编程题
1、解:#include"stdio.h"void main(){ char a,b,c,m,n,k; scanf("%c%c%c",&a,&b,&c); m=(a>b?a:b)>c?(a>b?a:b):c; n=(a k=a+b+c-m-n; printf("从小至大:%c,%c,%c",n,k,m);}原创 2015-03-21 10:22:25 · 876 阅读 · 0 评论 -
C语言程序设计(第二版)第11章例题
例11.1#includevoid main(){ FILE * fp; int i=0; char n; fp=fopen("F:\\text.txt","r"); while(!feof(fp)) { fscanf(fp,"%c",&n); printf("%c",n); i++; if(i==10){翻译 2015-09-19 15:12:34 · 1685 阅读 · 0 评论 -
C语言程序设计(第二版)第7章例题
例7.1 输入两个数,分别输出最大值、最小值及它们的差。#include#define PR printf#define CR PR("\n")#define CR2 CR;CRvoid main(){ double max,min; double x,y; scanf("%lf%lf",&x,&y); max=min=x; if(x>y) min=翻译 2015-07-29 17:22:16 · 971 阅读 · 0 评论 -
C语言程序设计(第二版)第6章编程题
1:找出与平均值相差最小的元素#include"stdio.h"#include"math.h"#define N 10void main(){ int i; double a[N],v=0,min; printf("Please input :\n"); for(i=0;i<N;i++){ //输入N个数 s原创 2015-07-29 13:23:05 · 3505 阅读 · 0 评论 -
C语言程序设计(第二版)第4章例题
例4.2#include"stdio.h"void main(){ int grade; printf("Please input grade:\n"); scanf("%d",&grade); if(grade>=60) printf("Pass\n"); else {原创 2015-03-21 11:26:08 · 1550 阅读 · 0 评论 -
C语言程序设计(第二版)第3章例题
例3.1:#include"stdio.h"void main(){ int a=2,b=2,x,y; x=--a+2; y=b--+2; printf("x=%d y=%d\n",x,y); printf("a=%d b=%d\n",a,b);}例3.2:#in原创 2015-03-21 10:21:07 · 926 阅读 · 0 评论 -
C语言程序设计(第二版)第2章例题
例2.1:#include"stdio.h"int main(){ char ch; scanf("%c",&ch); printf("%c ASCII:%d\n",ch,ch);} 例2.2:#include"stdio.h"#define PI 3.14159void main()原创 2015-03-21 10:19:03 · 1134 阅读 · 0 评论 -
C语言程序设计第1章习题
四:1:#include"stdio.h"int main(){ printf("Merry Christmas!\n Happy New Year!"); return 0;} 2:#include"stdio.h"int main(){ int a; int x; printf原创 2015-03-21 10:17:21 · 781 阅读 · 0 评论 -
C语言程序设计(第二版)第1章例题
例1.1:#includeint main(){printf("Welcome to C\nA simple program");return 0;}例1.2:#includeint main(){ int x,y,sum; printf("Input data:\n"); scanf("%d",&x原创 2015-03-21 10:14:13 · 561 阅读 · 0 评论 -
C语言程序设计(第二版)第9章例题
例9.1#includestruct student3{ int no; char name[10]; int age; char sex; char addr[50]; double score;} ;void main(){ struct student3 s={940114,"李红",19,'F',"杭州下沙学林街80号",655.5};翻译 2015-09-19 17:05:09 · 804 阅读 · 0 评论