c language practice 3-- determine whether a 5-digit palindrome

#include <stdio.h> 
#include <stdlib.h>
 / * Title: determining whether a five-digit number Hui. * / 
Int main () {
 int A, A1, A2, A3, A4, A5;
 the while ( . 1 ) { 
the printf ( " Enter a 5 digits: " ); 
Scanf ( " % D " , & A ); 
A1 = % A 10 ; 
A2 = A / 10 % 10 ; 
A3 = A / 100 % 10 ; 
A4 = A / 1000 % 10 ; 
A5 = A / 10000;
 IF (A1 && A2 == == A5 A4) 
the printf ( " % D is a palindrome \ n- " , A);
 the else  
the printf ( " % D is not a palindrome number \ n- " , A); 
} 
return  0 ; 
}

Expand it

Guess you like

Origin www.cnblogs.com/gougouwang/p/11415679.html