Advertisement
mdgaziur001

For Kafi

Apr 3rd, 2020
243
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()
  4. {
  5.     char main[1000],rev[1000];
  6.     int freq=0;
  7.     scanf("%[^\n]",main);
  8.     int i,j;
  9.     int len=strlen(main)-1;
  10.     for(i=len,j=0;i>=0;i--,j++)
  11.     {
  12.         rev[j]=main[i];
  13.     }
  14.     for(i=0;i<len;i++)
  15.     {
  16.         if(rev[i]==main[i]){
  17.             freq++;
  18.         }
  19.     }
  20.     if(freq==len){
  21.         printf("Yes\n");
  22.     }
  23.     else{
  24.         printf("No\n");
  25.     }
  26. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement