Advertisement
Josif_tepe

Untitled

Jun 7th, 2021
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <ctype.h>
  4. #include <string.h>
  5. int main()
  6. {
  7.     char niza[50];
  8.     scanf("%s", niza);
  9.    
  10.     int S = 0;
  11.     int E = strlen(niza) - 1;
  12.    
  13.     while(S < E) {
  14.         if(niza[S] == niza[E]) {
  15.             S++;
  16.             E--;
  17.         }
  18.         else {
  19.             printf("Zborot ne palindrom");
  20.             return 0;
  21.         }
  22.     }
  23.     printf("Zborot e palindrom");
  24.     return 0;
  25. }
  26.  
  27.  
  28.  
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement