以下程序的输出结果是 【 】 。
include<iostream.h>
unsigned fun (unsigned num)
{unsigned k=1;
do{k*=num%10;num/=10;} while(num);
return k;
}
void main( )
{ unsigned n=26;
cout <<fun(n) <<end1
第1题:
下面程序的输出结果是_______。 unsigned fun(unsigned num) { unsigned k=1; do { k*=num%10; num/=10; }while(num); return(k); } main() { unsigned n=26; printf("%d\n",fun(n)); }
A.0
B.4
C.12
D.无限次循环
第2题:
以下程序的输出结果是unsigned fun6(unsigned num){ unsigned k=1; do{k *=num%10;num/=10;} while (num); return k;}main(){ unsigned n=26; printf("%d\n", fun6(n));}
第3题:
【填空题】以下程序的输出结果为()。 main() {short i; i=-4; printf("ni:dec=%d, oct=%o, hex=%x, unsigned=%un",i,i,i,i); }
第4题:
以下程序的输出结果是【 】。
include<iostream.h>
unsigned frn(ullsigned num)
{ unsi9ned k=1;
do{k*=num%10;num/=10;} while(num);
return k;
}
void main()
{ unsigned n=26;
cout<<fun(n) <<endl;
}
第5题:
下面程序的输出结果是【 】。
unsigned fun6(unsigned num)
{ unsigned k=1;
do { k*=hum%10;
num/=10;}while(num);
return(k); }
main()
{ unsigned n=26;
printf("%d\n",fun6(n));}