1、t? s:t); printf(, t); return 0;题2:ISBN号码 int sum=0; char a13 = 0; gets(a); sum = (a0 - 0)*1 + (a2 - ) * 2 + (a3 - ) * 3 + (a4 - ) * 4 + (a6 - ) * 5 + (a7 - ) * 6 + (a8 - ) * 7 + (a9 - ) * 8 +(a10 - ) * 9; if (sum%11 = a12-)|(sum%11=10&a12=X) /注意正确情况几种类型 printf(Right); else if (sum%11 = 10) a12 = ; e
2、lse a12 = sum%11 + puts(a);题3:相反数 int i, j, n,t=0; int a501;ai); n-1; for (j = i + 1; j j+) if (ai + aj = 0) t+; 题4:窗口typedef struct window1 int x1,x2,y1,y2,order; window;void Inputwindow(window ws,int n) int i; for(i=1;i=wsi.x1&x=wsi.y1&y=0;i-) wsi+1=wsi; ws0=w; int i,n,m,x,y,pos;%d%dn,&m); window
3、wsn; Inputwindow(ws,n); m;x,&y); pos=getpos(ws,n,x,y); if(pos=-1) printf(IGNOREDn else%dn,wspos.order); movewindow(ws,n,pos); 题5:相邻数对math.h int a1001; n - 1; if (abs(ai - aj) = 1) t+;题6:画图 int i, j, n,k, t = 0; int a1014;ai0, &ai1, &ai2, &ai3); 101; for (j = 0; for (k = 0; k = ak0 &ak2 & i = ak1 &ak3) break; if (k n) t+;题7:门禁系统 int i, n, s = 0; int a1001 = 0 ;%d , as);题8:z字形扫描 int i, j, k, n; int a500500; i j scanf(aij); for (k = 0; k mouthi) d = d - mouthi; if (d = 0) d = mouthi; else break; /注意中断,确保月份不出错%dn%d, i, d);题13:数位之和 int n, sum = 0; while (n) sum = sum + n%10;