欢迎来到天天文库
浏览记录
ID:21935298
大小:1.76 MB
页数:18页
时间:2018-10-25
《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+
2、(a/10)*10+(b%10);}五floatfun(float*a,intn){inti;floatave=0.0;for(i=0;i3、*n=0;for(i=7;i<=m;i++)if((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、ti,j=0;for(i=1;i7、,j;for(i=0;itt[j][i]){min=tt[j][i];k=j;}pp[i]=tt[k][i];}}8、十六unsignedfun(unsignedw){if(w>10000)w%=10000;elseif(w>1000)w%=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(*9、p!=c)s[i++]=*p;p++;}s[i]=0;}十九intfun(char*s,intnum){charch;inti,j;for(i=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+strlen10、(substr);cnt++;}returncnt;}二十一voidfun(intm,int*k,intxx[]){inti,cnt=0;for(i=2;i
3、*n=0;for(i=7;i<=m;i++)if((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、ti,j=0;for(i=1;i7、,j;for(i=0;itt[j][i]){min=tt[j][i];k=j;}pp[i]=tt[k][i];}}8、十六unsignedfun(unsignedw){if(w>10000)w%=10000;elseif(w>1000)w%=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(*9、p!=c)s[i++]=*p;p++;}s[i]=0;}十九intfun(char*s,intnum){charch;inti,j;for(i=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+strlen10、(substr);cnt++;}returncnt;}二十一voidfun(intm,int*k,intxx[]){inti,cnt=0;for(i=2;i
6、ti,j=0;for(i=1;i7、,j;for(i=0;itt[j][i]){min=tt[j][i];k=j;}pp[i]=tt[k][i];}}8、十六unsignedfun(unsignedw){if(w>10000)w%=10000;elseif(w>1000)w%=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(*9、p!=c)s[i++]=*p;p++;}s[i]=0;}十九intfun(char*s,intnum){charch;inti,j;for(i=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+strlen10、(substr);cnt++;}returncnt;}二十一voidfun(intm,int*k,intxx[]){inti,cnt=0;for(i=2;i
7、,j;for(i=0;itt[j][i]){min=tt[j][i];k=j;}pp[i]=tt[k][i];}}
8、十六unsignedfun(unsignedw){if(w>10000)w%=10000;elseif(w>1000)w%=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(*
9、p!=c)s[i++]=*p;p++;}s[i]=0;}十九intfun(char*s,intnum){charch;inti,j;for(i=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
10、(substr);cnt++;}returncnt;}二十一voidfun(intm,int*k,intxx[]){inti,cnt=0;for(i=2;i
此文档下载收益归作者所有