水仙花数是指一个n位数(n≥3),它的每个位上的数字的n次幂之和等于它本身。例如,153是一个水仙花数,因为1^3 + 5^3 + 3^3 = 153。
下面是用C语言实现水仙花数判断的源代码:
#include <stdio.h>
#include <math.h>
int isArmstrongNumber(int number) {
水仙花数是指一个n位数(n≥3),它的每个位上的数字的n次幂之和等于它本身。例如,153是一个水仙花数,因为1^3 + 5^3 + 3^3 = 153。
下面是用C语言实现水仙花数判断的源代码:
#include <stdio.h>
#include <math.h>
int isArmstrongNumber(int number) {