Advertisement
KingaGolas

Zad 2.3

Apr 15th, 2020
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4.  
  5. using namespace std;
  6.  
  7. void srand ()
  8. {
  9. srand(time(NULL));
  10. int s=0;
  11. for (int i=0; i<100; i++)
  12. {
  13. s=s+(10+rand()%(20-10+1));
  14. }
  15. cout << s <<endl;
  16. }
  17.  
  18. int main()
  19. {
  20. srand ();
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement