KarolWozniak

Zadanie 8 tablice

Apr 16th, 2020
58
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 <cstdlib>
  3. #include <ctime>
  4.  
  5. using namespace std;
  6.  
  7. int tab[10];
  8. int a=1,b=50;
  9.  
  10. int main()
  11. {
  12. srand(time(NULL));
  13. for(int i=0;i<10;i++)
  14. {
  15. tab[i] = a+rand()%(b-a+1);
  16. cout << tab[i] << endl;
  17. }
  18. return 0;
  19. }
Add Comment
Please, Sign In to add comment