Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- using namespace std;
- int tab[10];
- int a=1,b=50;
- int main()
- {
- srand(time(NULL));
- for(int i=0;i<10;i++)
- {
- tab[i] = a+rand()%(b-a+1);
- cout << tab[i] << endl;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment