MaxxxxiorS

Na piątkę 17.03.2021

Mar 17th, 2021
812
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. char tab[3];
  6.  
  7. void randomLetter(char tab[])
  8. {
  9.     int x=0;
  10.     do
  11.     {
  12.         cout << "Podaj " << x+1 << " literę: ";
  13.         cin >> tab[x];
  14.         x++;
  15.     } while(x<3);
  16. }
  17.  
  18. void showArray(char *tab)
  19. {
  20.     int y=0;
  21.     do
  22.     {
  23.         cout << tab[y] << endl;
  24.         y++;
  25.     } while(y<3);
  26. }
  27.  
  28. int main()
  29. {
  30.     randomLetter(tab);
  31.     showArray(tab);
  32.  
  33.     return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment