- 博客(14)
- 收藏
- 关注
原创 C语言程序设计现代方法第二版 第十三章答案
1:#include<stdio.h>#include<string.h>#define N 20int main(void){ char smallest_word[N+1],largest_word[N+1]; char ch[N+1]; printf("Enter word:"); scanf("%s",ch); strcpy(small...
2020-04-06 19:25:46
4007
原创 C语言程序设计现代方法第二版 第十二章答案
1:#include<stdio.h>int main(void){ char ch[100]; char *p; int i=0; printf("Enter a message:"); while( 1){ ch[i]=getchar(); if(ch[i]=='\n') break; i++; } i--; p=&ch[i]; p...
2020-04-06 14:32:11
2895
原创 C语言程序设计现代方法第二版 第十一章答案
1:#include<stdio.h>void pay_amonut(int dollars,int*twenties,int *tens,int *fives,int *ones);int main(void){ int x; printf("Enter a dollar amount:"); scanf("%d",&x); int twenties,ten...
2020-04-02 11:53:06
2790
3
原创 C语言程序设计现代方法第二版 第十章答案(下)
5:/********************************************************* * From C PROGRAMMING: A MODERN APPROACH, Second Edition * * By K. N. King * * Copyright (c) 200...
2020-04-01 17:11:51
1181
2
原创 C语言程序设计现代方法第二版 第十章答案(上)
1:#include <stdio.h>#include<string>#define STACK_SIZE 100int top = 0;char contents[STACK_SIZE];void make_empty(void){ top = 0;}bool is_empty(void){ return top == 0;}bool is_...
2020-04-01 17:06:29
2007
原创 C语言程序设计现代方法第二版 第九章答案
1:void selection_sort (int n, int a[]) { int i,temp= a[0]; for(i=0;i<n;i++) { for(int j=i+1;j<n;j++) { if(a[i]>a[j]){ temp=a[i]; a[i]=a[j]; a[j]=temp;} else {c...
2020-04-01 15:22:33
1528
原创 C语言程序设计现代方法第二版 第八章答案
1:#include <stdio.h> int main (void){ float num; // 具体换成不同的基本类型 float res = 1; printf ("Enter a positive integer: "); scanf ("%f", &num); for (int i = 1; i <= num...
2020-04-01 14:29:29
2521
原创 C语言程序设计现代方法第二版 第七章答案
1:#include<stdio.h>int main(void){ long int i,n; printf("This program prints a table of squares.\n"); printf("Enter number of entries in table:"); scanf("%ld",&n); for(i=1;i<=n;i+...
2020-04-01 13:42:48
1659
6
原创 C语言程序设计现代方法第二版 第六章答案
1:#include<stdio.h>int main(void){ float x,max=0.0; do{ printf("Enter a number:"); scanf("%f",&x); if(x>max) max=x; }while(x>0); printf("\nThe largest numnber entered w...
2020-04-01 11:18:41
1588
原创 C语言程序设计现代方法第二版 第五章答案
1:#include<stdio.h>#include<math.h>int main(void){printf(“Enter a number:”);int x,y;scanf("%d",&x);y=abs(x);printf("The number %d has ",x);if(y<10)printf("1 ");else if(y...
2020-03-31 22:17:51
1361
原创 C语言程序设计现代方法第二版 第四章答案
1:#include<stdio.h>int main(void){int x;printf(“Enter a two-dight number:”);scanf("%d",&x);printf(“The reversal is:%d%d\n”,x%10,x/10);return 0;}2:#include<stdio.h>int main(...
2020-03-31 21:49:19
1418
原创 C语言程序设计现代方法第二版 第三章答案
1:#include<stdio.h>int main(void){ int x,y,z; printf("Enter a date (mm/dd/yyyy):"); scanf("%d/%d/%d",&x,&y,&z); printf("You entered the date %d%.2d%d\n",z,x,y);...
2020-03-31 21:34:07
695
原创 C语言程序设计现代方法第二版 第二章答案
有部分借鉴了别人的题,大部分都是自己做的,有些是因为和别人思路一样,所以偷懒直接复制。如有侵权,敬请告知本人目前学到22章完了,以前作为萌新的时候一直找不到全部答案很沮伤,希望能后来学习C的萌新一些做题思路。ps:22章学完后,基本入门了1:#include<stdio.h>int main(void){ printf(" *\...
2020-03-31 21:22:36
669
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人