#include"stdio.h"
void main()
{
int i,j,k,n;
printf("please input the n:\n");
scanf("%d",&n);
printf("\n");
i=n/100;
j=(n-100*i)/10;
k=n%10;
if(i*i*i+j*j*j+k*k*k==n)
printf("the %d is Narcissistic number!\n",n);
else
printf("the %d is not Narcissistic number!\n",n);
}
第九题
最新推荐文章于 2022-03-27 22:45:29 发布