帮我看看这源代码的错误
源代码帮我看错误#include<stdio.h>#include <math.h>
bool Isprime(int num){
if (num<=1)
return false;
for(int i=2;i<=sqrt(num);i++)
{
if(num%i==0)
return false;
}
return true;
}
bool IsDaffodil(int num){
int a=num/100,b=num/10%10,c=num%10;
return num == a*a*a+b*b*b+c*c*c;
}
bool IsPerfect(int num){
int n,i,a,b;
for(b=0,i=1;i<=a/2;i++)
if(!(a%i))b+=i;
for(n=0,i=1;i<=b/2;i++)
if(!(b%i))n+=i;
if(n==a&&a<b)
return num=a;
}
bool isPalindrome(int num){
return num%10 == num/100;
}
void main(){
int choose,i;
while (true)
{
printf("==================菜单===============\n");
printf("1 素数\n2 回文数\n3 水仙花数\n4 亲密数\n0 退出\n");
printf("======================================\n");
scanf("%d",&choose);
switch (choose)
{
case 1:
printf("1-3000之间的素数:\n");
for (i=1;i<3000;i++)
if (Isprime(i))
printf("%-4d",i);
printf("\n");
break;
case 2:
printf("1-3000之间的回文数:\n");
for (i=1;i<3000;i++)
if (isPalindrome(i))
printf("%-4d",i);
printf("\n");
break;
case3:
printf("1-3000之间的水仙花数:\n");
for (i=1;i<3000;i++)
if (IsDaffodil(i))
printf("%-4d",i);
printf("\n");
break;
case4:
printf("1-3000之间的亲密数:\n");
for (i=1;i<3000;i++)
if (IsDaffodil(i))
printf("%-4d",i);
printf("\n");
break;
case 0:
return;
break;
default:
printf("输入错误!\n");
break;
}
}
}