0
Plz solve this logical error in Anti-Lychrel Numbers
2 odpowiedzi
+ 7
Corrected the code copy and paste this it
rev=0, rem=0;
while(num > 0)
{
rem=num%10;
num/=10;
rev=rev*10+rem;
}
printf ("\n%d\n", rev);
if (rev==number)
{
printf ("\n%d: number is palindrome\n",number);
return 0;
}
else
{
num=number+rev;
goto A;
}
0
when I used goto statement in my program , after jump to 'A' value stored in 'num'variable is 'zero'
can u tell reason behind it??