SHARE
TWEET

Untitled

a guest Jun 27th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string>    
  3.  
  4. using namespace std;
  5.  
  6. void reverse(char *str, int count)
  7.       {
  8.     for( int x = 1; x <= count; x++)
  9.    {
  10.        cout << str[ count - x];//вывод пеевернутой строки
  11.    }
  12.       }
  13.  
  14.  
  15. int main() {
  16.   //    string S = "Test of pen";
  17.      
  18.     char str[100] =  "Test of pen";//строка которую мы будем переворачивать
  19.    // str = strcpy(str, S);
  20.     reverse(str, 6);// отправляем унк строку и до какого символа мы будем перевораивать строку
  21.    // cout << str << endl;
  22.     return 0;
  23. }
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