SHARE
TWEET

Untitled

a guest Apr 21st, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. #include<string.h>
  3. int main(void)
  4. {
  5.     int len,i,count=0;
  6.     char a[100];
  7.     scanf("%[^\n]",a);
  8.     len = strlen(a);
  9.     for(i=0;i<len-1;i++)
  10.     {
  11.         if(a[i]!=a[len-i-1])
  12.         {
  13.             count++;
  14.             break; 
  15.         }
  16.     }
  17.     if(count>=1)
  18.     {
  19.         printf("Not an Palindrome");
  20.     }
  21.     else
  22.     {
  23.         printf("String Palindrome");
  24.     }
  25.     return 0;
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top