Next Magic Number

#include<stdio.h>

int isMagicalNumber(int num)
{
int flag =0,r;
while(num > 0)
{
r = num%10;
if(r == 4 || r==7)
flag =1;
else
{
flag = 0;
return flag;
}
num = num/10;
}
return flag;

}
int findnextMagicNumber(int num)
{
while(1)
{
num = num+1;
if(isMagicalNumber(num))
{
printf(“The next magical number is %d\n”,num);
break;
}
else
continue;
}

}
int main()
{
int num;

printf(“Enter a magical number\n”);
scanf("%d",&num);
if(isMagicalNumber(num))
findnextMagicNumber(num);
else
printf(“not a magical number please enter the magical number\n”);

}

//