Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cstdlib>
- #include <conio.h>
- using namespace std;
- string podaj(int ile)
- {
- string glowny, dodaj;
- for (int indeks = 0; indeks < ile; indeks++)
- {
- cout << "Podaj wyraz " << indeks + 1 << " \n";
- cin >> dodaj;
- glowny += dodaj + ", ";
- }
- return glowny;
- }
- int main()
- {
- int liczba_wyrazow = 10;
- string lancuch_glowny = podaj(liczba_wyrazow);
- cout << "Ciag znakow to: " << lancuch_glowny << endl;
- system( "PAUSE" );
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment