#include <iostream>
using namespace std;
int main() {
   cout << "Liczby przed sortowaniem rosnącym" << endl;
    int x; 
    int A[10]={3, 144, 5, 100, 7, 44, 22, 11, 33, 4};
    for (int i=0; i<10;i++)
        cout << A[i]<< " ";
    cout << endl; 
    bool z = 1; 
    while (z)
        {z=0;
        for (int i=0; i<9;i++)
            if (A[i]>A[i+1])
            {x=A[i];
            A[i]=A[i+1];
             A[i+1]=x;
             z=1;}}
    cout << "Po porzadkowaniu" << endl;
    for (int i=0; i<10;i++)
        cout <<A[i]<< " ";
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: