【文章內(nèi)容簡介】
define M 11 main() { int a[M],i。 system(“CLS”)。 for(i=0。iM1。i++) scanf(%d,amp。a[i])。 /************found************/ ___(1)___=a[0]。 for(i=1。iM1。i++) /************found************/ if(___(2)___) a[M1]=a[i]。 printf(Max is %d\n,a[M1])。 }在考生文件夾下,: m!求 Cmn= —————— 之值。 n! * (mn)! 例如,當m=12,n=2時,程序的輸出應(yīng)為:Cmn is: 66 。 include long int fun(int x) {long int s=1。 int i。 for (i=1。i=x。i++) s*=i。 /************found************/ ____(1)____。 } main() { long int m=12,n=2,s1,s2,s3。 system(“CLS”)。 s1=fun(m)。 s2=fun(n)。 s3=fun(mn)。 /************found************/ printf(Cmn is : %ld,____(2)____ )。 }在考生文件夾下,:計算正整數(shù)num的各位上的數(shù)字之和。 例如,若輸入:252,則輸出應(yīng)該是:9。若輸入:202,則輸出應(yīng)該是:4。include include main( ) { int num,k。 system(“CLS”)。 /************found************/ ___(1)___。 printf(\Please enter a number:) 。 scanf(%d,amp。num) 。 do {/***********found************/ k=___(2)___ 。 num/=10。 } while(num) 。 printf(\n%d\n,k) 。 }在考生文件夾下,:求兩個正整數(shù)[m,n]之間所有既能被3整除也能被7整除的整數(shù)之和。例如:m=1,n=1000,則程序的輸出結(jié)果應(yīng)為:Sum is : 23688。 include include long int fun( x , y ) int x , y。 {int i,t。 long int s=0。 if( xy ) { t=x。 x=y。 y=t。} for (i=x。i=y。i++) if ( i%3==0 amp。amp。 i%7==0 ) s += i。 /************found************/ ____(1)____。 } main() { int m=1,n=1000。 system(“CLS”)。 /************found************/ printf(Sum is : %ld, ____(2)____ )。 }