欢迎来到天天文库
浏览记录
ID:12337112
大小:1.70 MB
页数:18页
时间:2018-07-16
《c语言上机题库程序设计》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、一voidfun(inta,intb,long*c){*c=(a/10)*1000+(b/10)*100+(a%10)*10+(b%10);}二voidfun(inta,intb,long*c){*c=(b/10)*1000+(a%10)*100+(b%10)*10+(a/10);}三voidfun(inta,intb,long*c){*c=(b%10)*1000+(a%10)*100+(b/10)*10+(a/10);}四voidfun(inta,intb,long*c){*c=(a%10)*1000+(b/10)*100+(a/10)*10+(b
2、%10);}五floatfun(float*a,intn){inti;floatave=0.0;for(i=0;i3、((i%7==0)4、5、(i%11==0))a[(*n)++]=i;}八voidfun(char*ss){inti;for(i=1;i='a'&&ss[i]<='z')ss[i]-=32;}}九voidfun(char*s,chart[]){inti,j=0;for(i=0;i6、+]=s[i];t[j]=0;}十一voidfun(char*s,chart[]){inti,j=0;for(i=0;i7、十四intfun(inta[][N]){inti,j;for(i=0;itt[j][i]){min=tt[j][i];k=j;}pp[i]=tt[k][i];}}十六unsignedfun(unsignedw){if(w>10000)w%=10000;elseif(w>1000)w8、%=1000;elseif(w>100)w%=100;elseif(w>10)w%=10;returnw;}十七fun(char*s){charb[N];inti=0,j;memset(b,0,N);for(j=strlen(s)-1;j>=0;j--)b[i++]=s[j];strcpy(s,b);}十八intfun(chars[],charc){char*p=s;inti=0;while(*p){if(*p!=c)s[i++]=*p;p++;}s[i]=0;}十九intfun(char*s,intnum){charch;inti,j;for(i=9、1;i<6;i++)for(j=i+1;j<6;j++){if(*(s+i)<*(s+j)){ch=*(s+j);*(s+j)=*(s+i);*(s+i)=ch;}}}二十intfun(char*str,char*substr){intcnt=0;char*p=str,*q;while(*p){q=strstr(p,substr);if(q==NULL)break;p=q+strlen(substr);cnt++;}returncnt;}二十一voidfun(intm,int*k,intxx[]){inti,cnt=0;for(i=2;i10、)if(isP(i))xx[cnt++]=i;*k=cnt;}二十二intfun(char*ss,charc
3、((i%7==0)
4、
5、(i%11==0))a[(*n)++]=i;}八voidfun(char*ss){inti;for(i=1;i='a'&&ss[i]<='z')ss[i]-=32;}}九voidfun(char*s,chart[]){inti,j=0;for(i=0;i6、+]=s[i];t[j]=0;}十一voidfun(char*s,chart[]){inti,j=0;for(i=0;i7、十四intfun(inta[][N]){inti,j;for(i=0;itt[j][i]){min=tt[j][i];k=j;}pp[i]=tt[k][i];}}十六unsignedfun(unsignedw){if(w>10000)w%=10000;elseif(w>1000)w8、%=1000;elseif(w>100)w%=100;elseif(w>10)w%=10;returnw;}十七fun(char*s){charb[N];inti=0,j;memset(b,0,N);for(j=strlen(s)-1;j>=0;j--)b[i++]=s[j];strcpy(s,b);}十八intfun(chars[],charc){char*p=s;inti=0;while(*p){if(*p!=c)s[i++]=*p;p++;}s[i]=0;}十九intfun(char*s,intnum){charch;inti,j;for(i=9、1;i<6;i++)for(j=i+1;j<6;j++){if(*(s+i)<*(s+j)){ch=*(s+j);*(s+j)=*(s+i);*(s+i)=ch;}}}二十intfun(char*str,char*substr){intcnt=0;char*p=str,*q;while(*p){q=strstr(p,substr);if(q==NULL)break;p=q+strlen(substr);cnt++;}returncnt;}二十一voidfun(intm,int*k,intxx[]){inti,cnt=0;for(i=2;i10、)if(isP(i))xx[cnt++]=i;*k=cnt;}二十二intfun(char*ss,charc
6、+]=s[i];t[j]=0;}十一voidfun(char*s,chart[]){inti,j=0;for(i=0;i7、十四intfun(inta[][N]){inti,j;for(i=0;itt[j][i]){min=tt[j][i];k=j;}pp[i]=tt[k][i];}}十六unsignedfun(unsignedw){if(w>10000)w%=10000;elseif(w>1000)w8、%=1000;elseif(w>100)w%=100;elseif(w>10)w%=10;returnw;}十七fun(char*s){charb[N];inti=0,j;memset(b,0,N);for(j=strlen(s)-1;j>=0;j--)b[i++]=s[j];strcpy(s,b);}十八intfun(chars[],charc){char*p=s;inti=0;while(*p){if(*p!=c)s[i++]=*p;p++;}s[i]=0;}十九intfun(char*s,intnum){charch;inti,j;for(i=9、1;i<6;i++)for(j=i+1;j<6;j++){if(*(s+i)<*(s+j)){ch=*(s+j);*(s+j)=*(s+i);*(s+i)=ch;}}}二十intfun(char*str,char*substr){intcnt=0;char*p=str,*q;while(*p){q=strstr(p,substr);if(q==NULL)break;p=q+strlen(substr);cnt++;}returncnt;}二十一voidfun(intm,int*k,intxx[]){inti,cnt=0;for(i=2;i10、)if(isP(i))xx[cnt++]=i;*k=cnt;}二十二intfun(char*ss,charc
7、十四intfun(inta[][N]){inti,j;for(i=0;itt[j][i]){min=tt[j][i];k=j;}pp[i]=tt[k][i];}}十六unsignedfun(unsignedw){if(w>10000)w%=10000;elseif(w>1000)w
8、%=1000;elseif(w>100)w%=100;elseif(w>10)w%=10;returnw;}十七fun(char*s){charb[N];inti=0,j;memset(b,0,N);for(j=strlen(s)-1;j>=0;j--)b[i++]=s[j];strcpy(s,b);}十八intfun(chars[],charc){char*p=s;inti=0;while(*p){if(*p!=c)s[i++]=*p;p++;}s[i]=0;}十九intfun(char*s,intnum){charch;inti,j;for(i=
9、1;i<6;i++)for(j=i+1;j<6;j++){if(*(s+i)<*(s+j)){ch=*(s+j);*(s+j)=*(s+i);*(s+i)=ch;}}}二十intfun(char*str,char*substr){intcnt=0;char*p=str,*q;while(*p){q=strstr(p,substr);if(q==NULL)break;p=q+strlen(substr);cnt++;}returncnt;}二十一voidfun(intm,int*k,intxx[]){inti,cnt=0;for(i=2;i10、)if(isP(i))xx[cnt++]=i;*k=cnt;}二十二intfun(char*ss,charc
10、)if(isP(i))xx[cnt++]=i;*k=cnt;}二十二intfun(char*ss,charc
此文档下载收益归作者所有