#include <stdio.h> main() { int a,b,c,i; for(a=1;a<=9;a++) for(b=0;b<=9;b++) for(c=0;c<=9;c++) if(a*a*a+b*b*b+c*c*c==a*100+b*10+c) printf("%d ",a*100+b*10+c); getchar(); }
#include <stdio.h> main() { int a,b,c,i; for(i=100;i<1000;i++) { a=i%10; b=i/10%10; c=i/100; if(a*a*a+b*b*b+c*c*c==i) printf("%d ",i); } getchar(); }
标签:main,C语言,int,水仙花,include,该数 From: https://www.cnblogs.com/xkdn/p/16757070.html