LukaszPanko

Zad 2

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