大佬这哪错了?
#include<stdio.h>
#include<stdlib.h>
void main()
{
int num,sd,td,hd;
for(num=100;num<1000;num++)
{
hd=num/100;
td=(num%100)/10;
sd=(num%100)%10;
if(num=hd^2+td^2+sd^2)
{
printf("水仙花数字:%d\n",num);
}
}
system("pause");
#include<stdio.h>
#include<stdlib.h>
void main()
{
int num,sd,td,hd;
for(num=100;num<1000;num++)
{
hd=num/100;
td=(num%100)/10;
sd=(num%100)%10;
if(num=hd^2+td^2+sd^2)
{
printf("水仙花数字:%d\n",num);
}
}
system("pause");
2018-11-14
举报