Advertisement
Kocyk

X D cofam sie w rozwoju

Jan 17th, 2020
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4. using namespace std;
  5.  
  6. int main(int argc, char *argv[])
  7. {
  8.     string tekst;
  9.     vector<string> v(1);
  10.  
  11.     do
  12.     {
  13.             cout<<"Podaj tekst"<<endl;
  14.             getline(cin,tekst);
  15.             v.push_back(tekst);
  16.  
  17.  
  18.  
  19.  
  20.     }while(tekst!="exit");
  21.      v.pop_back();
  22.      cout<<"To twoje slowa:"<<endl;
  23.     for(int i=0;i<v.size();i++)
  24.     {
  25.         cout<<v[i]<<" ";
  26.     }
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement