SHARE
TWEET

Untitled

a guest Mar 26th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. #include<string.h>
  3. #include<ctype.h>
  4.  
  5. int main() {
  6.     char symbols[100] = {0};
  7.     char result[100] = {0};
  8.     int lenght;
  9.  
  10.     gets(symbols);
  11.  
  12.     lenght = (int) strlen(symbols);
  13.  
  14.     int lenght2 = lenght + lenght/3;
  15.  
  16.     result[lenght2 --]=0;
  17.  
  18.     int counter=1;
  19.  
  20.     for(int i=lenght-1; i>=0; i--)
  21.     {
  22.         result[lenght2--]=symbols[i];
  23.         if(counter % 3 == 0)
  24.  
  25.             result[lenght2--]=' ';
  26.             counter++;
  27.  
  28.     }
  29.     printf("%s", result);
  30.  
  31.     return 0;
  32. }
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