#include <iostream>
#include <stdlib.h>
#include <time.h>

using namespace std;
void bubbleSort(int *array, int size)
{
    for (int n = size; n > 1; n--)
        for (int i = 0; i < n - 1; i++)
            if (array[i] > array[i + 1])
            {
                int swap = array[i];
                array[i] = array[i + 1];
                array[i + 1] = swap;
            }
}
void printArray(int *array, int size)
{
    cout << "->";
    for (int i = 0; i < size; i++)
        cout << array[i] << (i == size - 1 ? "" : ";");
    cout<<"\n\n";
}
int main()
{
    srand(time(NULL));
    int numbers[100];
    for (int i = 0; i < 100; i++)
    {
        numbers[i] = rand() % 100 + 1;
    }
    printArray(numbers, 100);
    bubbleSort(numbers, 100);
    printArray(numbers, 100);
}
