MarcinKrol

Zad 5 - Pseudolosowość

Apr 7th, 2020
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <iostream>
  2. #include <time.h>
  3. #include <cstdlib>
  4.  
  5.  
  6. using namespace std;
  7.  
  8. //Zad 5; Pseudolosowosc
  9.  
  10.  
  11. int main()
  12. {
  13. int i;
  14. srand(time(NULL));
  15.  
  16. for(;;)
  17. {
  18. i = rand()%2001-1000;
  19. cout << i <<", ";
  20.  
  21. if(i<201 && i>99)
  22. {
  23. return 0;
  24. }
  25. }
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment