Advertisement
Chieffo

losowanie

Nov 19th, 2014
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. #include <time.h>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. srand(time(NULL));//losowania zależne od czasu
  10.  
  11. for(int i=0;i<7;i++)
  12. {
  13. srand(7);//losowania większe od 7
  14. cout<<rand()%50+1<<endl;
  15.  
  16. }
  17.  
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement