int RevNum( int num )
{
const int base = 10;
int result = 0;
do
{
result *= base;
result += num % base;
} while( num /= base);
return( result );
}
To check if a number is a palindrome, reverse the number and see if it is equal to the original number. If so, the number is a palindrome, otherwise it is not. To reverse a number, use the following function: int reverse(int num, int base=10) { int reverse=0; while( num ) { reverse*=base; reverse+=num%base; num/=base; } return(reverse); }
Good luck. I don't think it is possible, since there is no such thing called upper case digits.
To check if a given number is palindromic, reverse its digits and see if the result has the same value ... This only works for positive numbersint isPalindrome (unsigned int N) {unsigned int R; /* the reversed version of that number */for (R = 0; N != 0; R = R*10 + N%10, N = int (N/10)); /* reverse digits */if (N == R) then return 1 else return 0;}
Telephone numbers throughout Russia are uniformly 3 digits for the area code plus 7 digits for the local number.
If the sum of squares of digits of a number equals to the number itself, then that number is called an aram strong number.
bghjg
The first two digits indicate it's a number for either Taiwan or Bangladesh.
Answers.com is not a reverse directory enquiry service!
how to write a program that counts automorphic number from 1 to 999
The smallest two digit number is 00 (a number used as a wire gauge) and the biggest is 99, so the sum of the biggest and smallest 2-digits numbers is 99 (99 + 00).
Plus or minus 65,535
The first two digits (49) suggest a number in Germany. HOWEVER - there is no area code starting with the next three digits (414),