Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <vector>
- using namespace std;
- int main(int argc, char *argv[])
- {
- string tekst;
- vector<string> v(1);
- do
- {
- cout<<"Podaj tekst"<<endl;
- getline(cin,tekst);
- v.push_back(tekst);
- }while(tekst!="exit");
- v.pop_back();
- cout<<"To twoje slowa:"<<endl;
- for(int i=0;i<v.size();i++)
- {
- cout<<v[i]<<" ";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement