daily pastebin goal
6%
SHARE
TWEET

Untitled

a guest Oct 19th, 2018 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4.  
  5. using namespace std;
  6.  
  7. void wypelnij_tablice(int* tablica)
  8. {
  9.     for(int i = 0; i < 10; ++i)
  10.         tablica[i] = rand() % 100 + 1;
  11. }
  12.  
  13. void wypisz_tablice(int* tablica)
  14. {
  15.     for(int i = 0; i < 10; ++i)
  16.         cout << tablica[i] << "\t";
  17.     cout << endl;
  18. }
  19.  
  20. void sortuj(int* tablica)
  21. {
  22.     // kod do wypełnienia
  23. }
  24.  
  25. int main()
  26. {
  27.     srand(static_cast<unsigned>(time(nullptr)));
  28.     int tablica[10];
  29.     wypelnij_tablice(tablica);
  30.     wypisz_tablice(tablica);
  31.     sortuj(tablica);
  32.     wypisz_tablice(tablica);
  33.     return 0;
  34. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top