//最简单的方法int a=abc;int x,y,z;x = a/100;y = (a/10)%10;z = a%10;if(a==(x*x*x+y*y*y+z*z*z))printf("%d是水仙花数",a);