1、l! printf(%d %d %dn,a,b,c); return 0;8#includestdio.h int a,b10,m=0,n=0,p; int i,j,k; scanf(%d,&a);=a; m=0; n=0; p=i; for(j=0;=0; bj=p%10; p=p/10; for(k=0;j; m=m+bk; if(bk=8) n=1; if(m%8=0) printf(%d ,i); continue; if(i%8=0) if(n=1)8的次数A*B#include stdlib.hvoid cheng(char a,char b) int i,j,ca,cb,*s;
2、ca=strlen(a); cb=strlen(b); s=(int *)malloc(sizeof(int)*(ca+cb); for (i=0;ca+cb;i+) si=0;ca; for (j=0;cb; si+j+1+=(ai-0)*(bj-); for (i=ca+cb-1;ii-) if (si=10) si-1+=si/10; si%=10; i=0; while(si=0) i+; for (;i+) printf(,si);n free(s); char a100,b100; gets(a),gets(b); if(a0=-b0!=)- cheng(&a1,b); else
3、if(a0=b0=a1,&b1); else if(a0! cheng(a,& else cheng(a,b);N边形面积#define PI 3.1415926double s,a;int n;scanf(%d %lfn,&s=a*a*n/(2*2*tan(PI/n);printf(%.2lfn,s);return 0;参加竞赛 int a,b,c,d,e; for(a=0;a2;a+) for(b=0;bb+) for(c=0;cc+) for(d=0;dd+) for(e=0;ee+) if(a=1&b=1)|(a=0&b=0) &(b=0&c=1)|(b=1&c=0)(c=1&d=1)
4、|(c=0&d=0)(!(d=0&e=0)(e=1&a=1&d=1)|(e=0) if(a=1)printf(A if(b=1)printf(B if(c=1)printf(C if(d=1)printf(D if(e=1)printf(E 草坪喷水插入排序void sort(int a,int n) int i; int k; int t;n; t=ai; k=i-1; while(tak) ak+1=ak; k-; if(k=-1)break; ak+1=t; int n; int a100;n); for(i=0; scanf(ai); sort(a,n); if(i=n-1) prin
5、tf(%dn,ai); else printf(查找车牌号 int i,j,n;i+) for(j=0;j+) for(n=33;nb?a:b#define min(a,b) ab:aint sum101;void jia(char a,char b) int flag=0,i,len1,len2,lenmax,lenmin; len1=strlen(a),len2=strlen(b); lenmax=max(len1,len2),lenmin=min(len1,len2);=lenmax; if(i sumlenmax-i=sumlenmax-i-10; flag=1; else flag=
6、0; else if(len1len2) sumlenmax-i=alen1-i- sumlenmax-i=blen2-i- if(flag=1)1lenmax;,sumi);void jian(char a,char b) int flag=0,i; int len1,len2;=len1;=len2) if(alen1-i-blen2-i-flag sumlen1-i=alen1-i-blen2-i-flag; flag=0; sumlen1-i=alen1-i-blen2-i-flag+10; if(alen1-i-flag- sumlen1-i=alen1-i-flag-; sumle
7、n1-i=alen1-i-flag+10-len1&sumi=0;i+); for(;len1;void compare(char a,char b)len2|(len1=len2&strcmp(a,b)0) jian(a,b); else if(strcmp(a,b)! jian(b,a);0n gets(a); gets(b); jia(& compare(&b1,&a1); jia(a,& compare(a,b);大写变小写char s80;int len,i; gets(s); len=strlen(s);len; if(siasim)break;printf (,n);分数 int
8、 k,x=1,y=1; float a,b;k);y=5000;y+) for(x=y;x#define MAXN 5000+10char bufMAXN,sMAXN;int pMAXN; int n,m=0,max=0,x,y; int i,j; fgets(buf,sizeof(s),stdin); n=strlen(buf); if(isalpha(bufi) pm=i; sm+=toupper(bufi);m;i-ji+jmax)max=j*2+1;x=pi-j;y=pi+j;i+j+1max)max=j*2+2;y=pi+j+1; for(i=x;=y;%c,bufi);iostre
9、amusing namespace std; char A5000,B5000; int a=0,b,c,d,e,f,n=0,m,p,q,C5000; while(Aa=cin.get()!n) a+; for(b=0,c=0;=a-1; if(Ab=65&Ab=97&=122) Bc=Ab,Cc=b; if(BcBcf+1n) n=m,p=e,q=f; for(a=Cp;=Cq; coutAa;endl;鸡的体重计算数据整数部分加密 FILE*pi; pi=fopen(in.dat,w char A1000,B1000; int i,n; gets(A); n=strlen(A); fpri
10、ntf(pi,Ai); if(A=Ain) break;i+;,i-1);卡片恐怖水母void paixu(int A,int m) int i=1,n=0,j=0; for(i=j+1;if(AiAj) n=Aj; Aj=Ai; Ai=n; int n=0,m=0,A100=0,B100=0,i=0,j=0,k=0;%d%dfor(i=0;Ai);Bi);if(mn)NULLnelse paixu(A,n);paixu(B,m);if(A0 j+=Bi+k;,j);快速排序 void QuickSort(int A,int n,int L,int R) int i,j,t; if(LR) i
11、=L;j=R+1; while(1) while(i+1n&A+i-1&A-j if(i=j)break; t=Ai;Ai=Aj;Aj=t; t=AL,AL=Aj,Aj=t; QuickSort(A,n,L,j-1); QuickSort(A,n,j+1,R); int A1000,n,i,j,p; if(n=1000) printf(Overflow!) ; /输入要排序的元素的数目,若大于1000则结束程序输出“Overflow!” /输入元素 QuickSort(A,n,0,n-1); for(i=n-1; /输出排序好的结果两人三足 int n,a50,i,j,t,sum=0;i+)
12、scanf( for (j=0;n-i-1;j+) if (ajaj+1) t=aj,aj=aj+1,aj+1=t;i+=2) sum+=ai;,sum);逆序输出偶数和 int n,i,sum=0; int an; scanf( if(i%2=0)sum=sum+ai;三角形面积士兵移动输出位数int i,n;for(i=1;if(n/10=0)break;else n=n/10;数列 int A10,B5,i;double C5;5;4; Bi=Ai+1-Ai;Ci=(double)Ai+1/Ai; if(B0=B1&B1=B2&B2=B3) for(i=5;10; Ai=Ai-1+B0,printf( if(C0=C1&C1=C2&C2=
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1