Guest User

Untitled

a guest
Sep 18th, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdlib.h>
  3. #include <cstring>
  4. #include <stdio.h>
  5. #define MAXLEN 20
  6.  
  7. using namespace std;
  8.  
  9.  
  10. char S2[MAXLEN];
  11. char S1[MAXLEN];
  12. int counter=0;
  13. int var=0,var2=0;
  14. int i,j;
  15.  
  16.  
  17. int main()
  18. {
  19.    
  20.    
  21.        
  22.     gets(S1);
  23.  
  24.  
  25.        
  26.        
  27.    
  28.     for (i=0; S1[i]!='\0';i++){
  29.         i=var;
  30.        
  31.     }
  32.    
  33.         for (j=0,i=0; var>=0;j++,i++,var--){
  34.            
  35.            
  36.             S1[i]=S2[j];
  37.            
  38.            
  39.         }
  40.         S2[j] = '\0';
  41.    
  42.    
  43.     while (var2 >=0){
  44.         cout << S2;
  45.    
  46.         var2--;
  47.         j++;
  48.     }
  49.    
  50.  
  51.    
  52.     return 0;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment