Advertisement
KonradKonieczny

Losowość - zadanie 3

Apr 3rd, 2020
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <time.h>
  3. #include <stdlib.h>
  4.  
  5. using namespace std;
  6.  
  7. int suma=0;
  8.  
  9. int main()
  10. {
  11.     srand(time(NULL));
  12.     for (int i=0;i<100; i++)
  13.     {
  14.         suma+=rand()%11+10;
  15.     }
  16.     cout<<"Suma >=1000 i <=2000 to: "<<suma;
  17.  
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement