Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void sortowanieWybor()
- {
- srand(time(NULL));
- int rozm;
- cout << "ILE LICZB PODASZ: ";
- cin >> rozm;
- int *tab = new int[rozm];
- for(int l = 0; l < rozm; l++)
- {
- int m = rand() % 100 + 1;
- tab[l] = m;
- }
- int temp;
- for(int i = 0; i < rozm; i++)
- {
- for(int j = i+1; j < rozm; j++)
- {
- if(tab[i] > tab[j])
- {
- temp = tab[i];
- tab[i] = tab[j];
- tab[j] = temp;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement