Guest User

Untitled

a guest
Sep 14th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string>
  3. #include <cstdlib>
  4. #include <conio.h>
  5.  
  6. using namespace std;
  7.  
  8. string podaj(int ile)
  9.     {
  10.         string glowny, dodaj;
  11.         for (int indeks = 0; indeks < ile; indeks++)
  12.             {
  13.                 cout << "Podaj wyraz " << indeks + 1 << " \n";
  14.                 cin >> dodaj;
  15.                 glowny +=  dodaj + ", ";
  16.             }
  17.         return glowny;
  18.     }
  19.  
  20.  
  21. int main()
  22.     {
  23.         int liczba_wyrazow = 10;
  24.         string lancuch_glowny = podaj(liczba_wyrazow);
  25.         cout << "Ciag znakow to: " << lancuch_glowny << endl;
  26.         system( "PAUSE" );
  27.         return 0;
  28.     }
Advertisement
Add Comment
Please, Sign In to add comment