资源描述:
《C语言考试系统题库.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、#include#includevoidmain(){intarr[10]={11,4,2,7,3,12,5,34,5,9},i;ints=0;/************found************/for(i=0;i<10;i++)/************found************/if(arr[i]%2==1)s=s+arr[i];printf("Theresultis:%d",s);}#include"stdio.h"#include"string.h"vo
2、idmain(){chars[10];unsignedi;/**************found************/intn=0;scanf("%s",s);/**************found************/for(i=0;i#includedoubleaverage(intarr[],intn){intk=0,i;doubles;s=0;f
3、or(i=0;i#include
4、#includevoidmain(){intx,y,t,max,min,i,n1,n2;printf("Pleaseentertwonumbers:");scanf("%d,%d",&x,&y);if(x>y){t=x;x=y;y=t;}n1=x;n2=y;t=n2%n1;/************found************/while(n1>n2){n2=n1;n1=t;t=n2%n1;}/************found************/max=t;min=x*y/max;pri
5、ntf("maxis:%d",max);printf("minis:%d",min);}#include#defineN3intfun(inta[N][N]){intmin;/***********begin***********/inti,j;min=a[0][0];for(i=0;i6、voidNONO();//函数声明inta[N][N]={-1,2,3,4,9,5,7,8,6};inti,j,min;printf("arrayis:");for(i=0;i7、10327\PROGIN.DAT","r");fw=fopen("D:\exam\05910327\PROGOUT.DAT","w");for(i=1;i<=5;i++){for(j=0;j#include8、>voidmain(){inta[3][3]={4,4,34,37,3,12,5,6,5},i,j,max,min;max=min=a[0][0];for(i=0;i<3;i++)/************found************/for(j=0;j<3;j++){if(max