Home > Back-end >  For help, why has not palindrome
For help, why has not palindrome

Time:04-04

#include
Int main ()
{
Int a, b, c, d, e, f;
Printf (" enter a 5 digit integer: ");
The scanf (" d ", & amp; A);
B=a/10000;/* digits */
C=a % 10000/1000;/* thousand digits */
D=a % 1000/100;/* the digits */
E=a % 100/10;/* 10 digits */
F=a % 10;/* single-digit */
If (b==f& & C==e)
Printf (" the number is a palindrome ");
The else
Printf (" the number is not a palindrome ");
return 0;

}

CodePudding user response:

Reference:
 # include & lt; stdio.h> 
Int main ()
{
Int a, b, c, d, e, f;
Printf (" enter a 5 digit integer: ");
The scanf (" % d ", & amp; A);//the scanf (" d ", & amp; A);
B=a/10000;/* digits */

C=a/1000% 10; Thousand digits/* *///c=a % 10000/1000;/* thousand digits */

D=a/100% 10;//d=a % 1000/100;/* the digits */

E=a/10% 10;//e=a % 100/10;/* 10 digits */
F=a % 10;/* single-digit */
If (b==f& & C==e)
Printf (" the number is a palindrome \ n ");
The else
Printf (" the number is not a palindrome \ n ");

return 0;
}

CodePudding user response:

Can join
Can participate
  • Related