It is a simple program. i think u may understand it :
#include
#include
#include
void 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
You can do this: <?php if ( $word === strrev( $word ) ) { echo "The word is a palindrome"; } else { echo "The word is not a palindrome"; }
You don't have to write palindrome programs in wikipedia.
write a c++program by using if statement to read a number and check whether it is positive or negative
Write your program and if you are having a problem post it here with a description of the problem you are having. What you are asking is for someone to do your homework for you.
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;
int pallindrom(int p){ /*write all logic*/ }
Use the Exception class and type converters.
To write a C program to determine if something is odd or even you need to be a programmer. To write a program in C is complicate and only done by programmers.
write a program in C to check whether a given number is apalindrome or not
Active Time spent online
If you want to check whether a string is a palindrome, you can reverse the string (for example, the Java class StringBuffer has a reverse() method), and then compare whether the two strings - the original string and the reverted string - are equal. Alternately, you could write a loop that checks whether the first character of the string is equal to the last one, the second is equal to the second-last one, etc.; that is, you have a counter variable (in a "for" loop) that goes from zero to length - 1 (call it "i"), and compare character #i with character #(length-i-1) inside the loop.
sdfdg