unsigned reverse (unsigned n) {
unsigned r = 0;
while (n) {
r *= 10;
r += (n%10);
n /= 10;
}
return r;
}
bool is_palindrome (unsigned n) {
return n == reverse (n);
}
int main () {
unsigned num;
printf ("Enter a number: ");
scanf ("%d", num);
if (is_palindrome (num))
printf ("%d is a palindrome\n");
else
printf ("%d is not a palindrome\n");
return 0;
}
Palindrome number is a number like 121 which remains the same when its digits are reversed. To find this number in a simple java program, just follow the below way. sum = 0; while(n>0) { r=n % 10; sum=concat(r); n=n / 10; } print r;
It is a simple program. i think u may understand it :#include#include#includevoid main(){char s[10]=answers.com;char x[10];int a;clrscr();strcpy(x,s);strrev(s);a=strcmp(s,x);if(a==0){printf("the entered string is palindrome");}else{printf("the entered string is not palindrome");}output:given string is not palindrome
906609=913*993 I found this using a relatively simple computer program that I wrote.
i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?
simple program
There is no simple answer because the position of the missing number is not known. Furthermore, it is not clear whether the sequence is an arithmetic, geometric or some other sequence.
hey..it s simple..make use of built-in function isdigit(character)..it s in stdlib.h...
Some EAPs are just a hotline. Employees are encouraged to call a particular number and ask for help.
Disconnecting a VCR from a Samsung TV is simple. All you have to do is download the uninstall program.
There is no simple way since there is no known pattern for the exact distribution of primes. You just have to go and check each number to see whether or not it is a prime.
A program can be looped in Python by wrapping the entire program in a for or while loop. If you wish to loop the program a finite amount of times, it can be done like so (x = the amount of times you want it to loop, this can be a number or variable storing a number): for i in range(0,x): [code] If you wish to loop the program infinitely, you can use a simple while loop: while True: [code]
Well, this is a very open question, please be specific, I will try try to answer this as well, a simple c language program can be any thing from printing your name on the screen to printing some patterns using symbols, or making a small game, or a simple calculator program. you can a clearer picture of what can be a simple c language program here: