Use namespace std
Long Reverse (Long Number) {
If (number/10 == 0)
Quantity returned;
Otherwise {
long temp = number,sum = number% 10。
while(temp/ 10! = 0){
sum * = 10;
temp/= 10;
}
Returns the sum+inverse (number/10);
}
}
int main(){
long num = 12332 1;
cout & lt& ltnum & lt& ltendl
Cout & lt& lt "After the reverse!" & lt& ltendl
Cout & lt& lt reverse (number)<& ltendl
if(num == reverse(num))
Cout & lt& lt "palindrome number!" & lt& ltendl
Else cout & lt& lt "is not palindrome!" & lt& ltendl
System ("suspended");
Returns 0;
}
Judging the recursive version of C++ by palindrome, it was debugged in VS2008.