填空题 (修改每对/**/之间存在的错误,完成题目的要求)
填空题 以下程序用以打印所有的“水仙花数”。所谓“水仙花数”是指一个三位数,其各位数字立方和等于该数本身。如:153是一“水仙花数”,因为153=1 3 +5 3 +3 3
#include<stdio.h>
int main()
{
int i, a, b, c;
printf("Narcissus numbers are:/n");
for(i=100; i<1000; i++)
{
a=i/100;
/**/ 1 b=i%10/10; /**/
c=i%10;
/**/ 2 if(a 3+b 3+c 3==i)/**/
printf("%5d", i);
}
return 0;
}
填空题 以下程序中的函数fun用以计算并输出给定n个数的方差。方差公式: