Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <ctime>
  2. #include <iostream>
  3. #include <cstdlib>
  4. #include <time.h>
  5. #include <windows.h>
  6. using namespace std;
  7. int x;
  8. int main()
  9. {
  10. cout<<"podaj ilosc liczb do sortowania ";
  11.  
  12. srand (time(NULL));
  13. cin>> x;
  14. int tab[x];
  15.  
  16. for (int n=0; n<x; n++)
  17.  
  18. {
  19. cout<<"wylosowana liczba to: ";,
  20. tab[n]=rand()%48+1;
  21. cout<<tab[n]<<endl;
  22. }
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement