C语言考试重点.doc
C语言考试重点2-4#include<stdio.h>void main()int a,b,t;printf("请输入两个整数:");scanf("%d%d",&a,&b);if(a<b)t=a;a=b;b=t;printf("排序之后的结果为:%d %dn",a,b); 2-9#include<stdio.h>void main()int i;printf("请输入数字1-7:");scanf("%d",&i);switch(i)case 1:printf("Today is Monday!n");break; case 2:printf("Today is Tuesday!n");break; case 3:printf("Today is Wednesday!n");break; case 4:printf("Today is Thursay!n");break; case 5:printf("Today is Friday!n");break; case 6:printf("Today is Saturday!n");break; case 7:printf("Today is Sunday!n");break; default:printf("ninput error!");2-16#include<stdio.h>void main()int m,n;long fib,fib1=1,fib2=1;printf("请输入n的值:");scanf("%d",&n);printf("%8ld%8ld",fib1,fib2);for(m=3;m<=n;m+)fib=fib1+fib2;fib1=fib2;fib2=fib;printf("%8ld",fib);if(m%5=0)printf("n"); L6#include<stdio.h>void main()char ch;int i;ch='A'ch=ch+32;i=ch;printf("%d is %cn",ch,i); printf("%c is %dn",ch,ch); L14#include<stdio.h>void main()char ch;printf("Input a char:"); ch=getchar();putchar(ch+32);L15#include<stdio.h>void main()int n;printf("Input a number:"); scanf("%d",&n);if(n%2=0)printf("这是一个偶数n"); elseprintf("这是一个奇数n"); L18#include<stdio.h>main()int i;printf("Input:");scanf("%d",&i);switch(i)case 0:printf("zero");break; case 1:printf("one");break;case 2:printf("two");break; case 3:printf("three");break; case 4:printf("four");break; default:printf("other"); L22#include<stdio.h>main()int n,sum=0;Loop:printf("Input a number:"); scanf("%d",&n);if(n!=-1)if(n%2=0)sum=sum+n;goto Loop;printf("sun=%d",sum);L23#include<stdio.h>main()int i,sum=0;i=1;while(i<=100)sum=sum+i;i=i+1;printf("sum=%d",sum);L28#include<stdio.h>main()int n,sum=0;n=0;while(n!=-1)printf("Input a number:");scanf("%d",&n);if(n%2=0)sum=sum+n;printf("sum=%d",sum);L29#include<stdio.h>main()int n;for(n=100;n<=200;n+)if(n%3=0)continue;printf("%5d",n);L30#include<stdio.h>main()int i,j;for(i=1;i<=9;i+)for(j=1;j<=i;j+)printf("%d*%d=%d ",j,i,i*j); printf("n");L31#include<stdio.h>main()int a10,j,temp;for(j=0;j<10;j+)待添加的隐藏文字内容2printf("Input a %d",j); scanf("%d",&aj);for(j=0;j<9;j+)if(aj>aj+1)temp=aj;aj=aj+1;aj+1=temp;for(j=0;j<10;j+)printf("%dt",aj);L35-1#include<stdio.h>main()int a,b,c,i;long t,sum;printf("Input a,b,c:");scanf("%d,%d,%d",&a,&b,&c);for(t=1,i=1;i<=a;i+)t=t*i;sum=t;for(t=1,i=1;i<=b;i+)t=t*i;sum+=t;for(t=1,i=1;i<=c;i+)t=t*i;sum+=t;printf("sum=%ld ",sum);L35-2#include<stdio.h>long abc(int n)long t;int i;for(t=1,i=1;i<=n;i+)t*=i;return(t);main()int a,b,c,i;long abc (int n);printf("Input a,b,c:");scanf("%d,%d,%d",&a,&b,&c);printf("sum=%ld ",abc(a)+abc(b)+abc(c); 29C91AFE4CED1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFEDD1B6C87D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF95AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9D1B6C8795AD9C91AFE4CED1B6C8795A1AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFC91FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6CD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF8795AD9C91FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C87D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF5D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFAD9C91FE4CED1B6C8795AD29C91AFB6C8795AD29C91AFB6C8795AD29C91AFD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFFE4CED1B6C8795AD29C91AFC8795AD9C91FE4CED1B6C8795AD29C91AFD1B6C8795AD9C91AFED1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8D1B6C8795AD9C91AFE4CED1D91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFC91FE4CED1D1B6C871AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFC91FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6CD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF8795AD9C91FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C87D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF5D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFAD9C91FE4CED1B6C8795AD29C91AFB6C8795AD29C91AFB6C8795AD29C91AFD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8791AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFC91FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6CD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF8795AD9C91FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C87D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF5D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFAD9C91FE4CED1B6C8795AD29C91AFB6C8795AD29C91AFB6C8795AD29C91AFD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFFE4CED1B6C8795AD29C91AFC8795AD9C91FE4CED1B6C8795AD29C91AFD1B6C8795AD9C91AFED1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8D1B6C8795AD9C91AFE4CED15AD9C91D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFFE4CED1B6C8795AD29C91AFC8795AD9C91FE4CED1B6C8795AD29C91AFD1B6C8795AD9C91AFED1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8D1B6C8795AD9C91AFE4CED195AD9C91AFE4CED1B6C8795AD91AFE4CED1B6CD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF8795AD9C91FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C87D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF5D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFAD9C91FE4CED1B6C8795AD29C91AFB6C8795AD29C91AFB6C8795AD29C91AFD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFFE4CED1B6C8795AD29C91AFC8795AD9C91FE4CED1B6C8795AD29C91AFD1B6C8795AD9C91AFED1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF795AD9C91FE4CED1B6C8795ADD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF29C91AF4CED1B6C8795AD1B6C8795AD9C91AFE4CED1B6C8795AD91AFD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFD1B6C8795AD29C91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C9D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF1AFD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFD1BD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF4CED1B6C8795AD29C91AFE4CED1B6C8795ADC6F554C62