Advertisement
MeehoweCK

Untitled

Aug 4th, 2021
729
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     string imie[10];        // stworzenie 10-elementowej tablicy typu string
  8.     for(short i = 0; i < 10; ++i)
  9.     {
  10.         cout << "Podaj imie osoby nr " << i + 1 << ": ";
  11.         cin >> imie[i];
  12.     }
  13.  
  14.     cout << "Osoby w bazie maja nastepujace imiona: ";
  15.     for(short i = 0; i < 10; ++i)
  16.     {
  17.         cout << imie[i];
  18.         if(i < 9)
  19.             cout << ", ";
  20.     }
  21.     cout << ".\n";
  22.  
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement