fork download
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4. using namespace std;
  5.  
  6. const int N = 25;
  7. int tab[N];
  8. void losuj(int a, int b) {
  9. srand(time(NULL));
  10. for (int i = 0; i < N; i++)
  11. tab [i] = a + rand () % (b - a + 1);
  12. }
  13.  
  14. void wypisz() {
  15. for (int i = 0; i < N; i++)
  16. cout << tab[i] << " ";
  17. cout << endl;
  18. }
  19.  
  20. int main() {
  21. losuj(10, 99);
  22. wypisz();
  23. return 0;
  24. }
Success #stdin #stdout 0s 5272KB
stdin
Standard input is empty
stdout
85 83 49 44 13 61 55 57 53 68 45 82 35 68 91 11 30 94 38 81 16 27 78 38 50