全文预览

C语言自测题

上传者:相惜 |  格式:pdf  |  页数:56 |  大小:6345KB

文档介绍
if(c=0) break;\ri f (x>max) maxlx\r}.\rfclose(fin);\rreturn max;\r)\r¶()·¸V\r1-I'Pp*\r6'¹`ºp—a[n]L»˜fŽ¼™?: int fun1 (int a[],\rint n);\rint fun1 (int a[], int n)\r(\ri nt i,s=0;\rfor (i=0;i<n;i++) s+=a[i]*a[i];\rreturn s;\r}\r2-I'Pp*C½\r6'¹`ºp—a[n]L»ep˜fPp?L»qp˜f\rPp*mC½ƒc 1 ? c 2 L¾M¿#$: void fun2(int a[], int n, int* d,\ri nt* c2)L\rvoid fun2 (int a [], int n, int* c1, int* c2)\r{\ri nt i;\r*c1=*c2=0;\rfor(1=0;i <n;i++)\ri f (a[i]%2!=0) (*c1)++; eIse (*c2)++;\r)\r3-I'PÁ’“pÂ(*\r6Pžpm ? n BGhip: int fun5(intm,\ri nt n);\rint fun5(int m, int n)\r(\rint r;\rwhi le(1) {\rif (n==0) return m;.\rr=m%nL\rm=n; n=r;\r)\r)

收藏

分享

举报
下载此文档