answersLogoWhite

0

#include<iostream>

unsigned int reverse(unsigned int num, unsigned int base=10)

{

unsigned int rev=0;

while( num )

{

rev*=base;

rev+=num%base;

num/=base;

}

return( rev );

}

int main()

{

std::cout<<"Palindromic numbers from 10 to 1000\n"<<std::endl;

for( unsigned int num=10; num<=1000; ++num)

if( num==reverse(num))

std::cout<<num<<std::endl;

}

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Write a Program in c to find palindrome numbers between any two numbers?

please somebody should help me answer this question..I have a project on it even! It seems almost impossible at the moment.


What Program that will display the even numbers in data structures and algorithms?

JAVA


How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


How do you write a palindrome program in c in Wikipedia?

You don't have to write palindrome programs in wikipedia.


How do you generate palindrome number between the given range?

The generation of palindromic numbers within a given range is best done with a computer program. Space it limited so an example of program code cannot be shown here, but the Codecast website gives full guidance.


How do you write a C plus plus program that will display the first 10 positive prime numbers?

By learning how to program on C+.


What BASIC program can compute and display all prime numbers from 1 to 40?

PRINT 2,3,5,7,11,13,17,19,23,29,31,37


Write a PHP program to check whether the string is palindrome or not?

You can do this: &lt;?php if ( $word === strrev( $word ) ) { echo "The word is a palindrome"; } else { echo "The word is not a palindrome"; }


How do you write a Qbasic program to display these Numbers-0112358132134?

you do this 10 print "0112358132134" use the whole of the thing


Find the largest palindrome made from the product of two 3-digit numbers?

906609=913*993 I found this using a relatively simple computer program that I wrote.


How do you write a VBnet program to find the prime numbers between 100 to 200?

VBnet program to find the prime numbers between 100 to 200?


Stack c language program of palindrome?

what ever you assume