下面程序的输出结果是_______。 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.0B.4C.12D.无限次循环
下面程序的输出结果是_______。 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.无限次循环
相关考题:
以下程序的输出结果是【18】。unsigned fun6(unsigned num){ unsigned k=1;do{k *=num;num/=10;}while (num);return k;}main(){ unsigned n=26;printf("%d\n", fun6(n));}
下面程序的输出结果是______。 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.0B.4C.12D.无限次循环
下列给定程序中函数fun()的功能是计算正整数num的各位上的数字之平方和。例如:输入352,则输出应该是38;若输入328,则输出应该是77。请改正程序中的错误,使它能得到正确结果。注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。试题程序:include <stdio.h>include <conio.h>long fun(long num){/*+**+*+*+*found************/long k=1;do{k+=(num%10)*(num%10);num/=10;/*********+found*+**+*+******/}while(num)return(k);}main(){long n;clrscr();printf("\Please enter a number:");scanf("%ld",n);printf("\n%ld\n",fun(n));}
以下程序的输出结果是【】。 include unsigned fun (unsigned num) {unsigned k=1; do{ 以下程序的输出结果是 【 】 。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
运行下列程序时,若输入数据为“321”,则输出结果是( )。 main() {int num,i,j,k,s; scanf("%d",num); if(num>99) s=3; else if(num>9) s=2; else s=1; i=num/100; j=(num-i*100)/10; k=(num-i*100-j*10); switch(s) {case 3:printf("%d%d%d\n",k,j,i); break; case 2:printf("%d%d\n",k,j); case 1:printf("%d\n",k); } }A.123B.1,2,3C.321D.3,2,1
以下程序的输出结果是【】。include unsigned frn(ullsigned num) { unsi9ned k=1; do{ 以下程序的输出结果是【 】。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;}
以下程序的输出结果是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));}
下面程序的输出结果是【 】。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));}