Guest User

Untitled

a guest
Jun 20th, 2012
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. int main ()
  4. {
  5.   char chn[81], crt, *ptr1, *ptr2;
  6.   scanf ("%80[^\n]",chn);
  7.  
  8.   ptr1 = ptr2 = chn;
  9.   while (*++ptr2);
  10.   ptr2--;
  11.   while (ptr1 < ptr2) {
  12.     *ptr1 ^= *ptr2;
  13.     *ptr2 ^= *ptr1;
  14.     *ptr1 ^= *ptr2;
  15.     ptr1++; ptr2--;
  16.   }
  17.  
  18.   ptr2 = chn;
  19.   while (*ptr2 != ' ' && *ptr2) ptr2++;
  20.   ptr1 = chn - 1;
  21.  
  22.   while (1)
  23.     {
  24.       ptr1++; ptr2--;
  25.  
  26.       while (ptr1 < ptr2) {
  27.         *ptr1 ^= *ptr2;
  28.         *ptr2 ^= *ptr1;
  29.         *ptr1 ^= *ptr2;
  30.         ptr1++; ptr2--;
  31.       }
  32.  
  33.       ptr2++;
  34.       while (*ptr2 != ' ' && *ptr2) ptr2++;
  35.       if (!*ptr2) break;
  36.       ptr1 = ptr2;
  37.       ptr2++;
  38.       while (*ptr2 != ' ' && *ptr2) ptr2++;
  39.     }
  40.  
  41.   /* InsΓ©rez votre code ici */
  42.   printf ("%s\n",chn);
  43.   return 0;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment