Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Autor: Paweł Koniarski
- * Data: 5 marca 2014 r.
- * Problem: Program sortujący dowolną liczbę liczb metodą bąbelkową.
- * Specyfikacja:
- * Dane: w zeszycie
- * Wyniki: w zeszycie
- * Plik: babel.cpp
- **/
- #include <iostream>
- using namespace std;
- const MAX = 100
- int main()
- {
- int i, j, n;
- int l[MAX];
- cout << "Podaj rozmiar tablicy: ";
- cin >> n;
- cout << "Wpisz " << n << " liczb:\n";
- for (i = 0; i < n; i++)
- cin >> l[i]
- for (i = 0; i < n; i++)
- for (j = 0; j < n-i; j++)
- if (l[j] > l[j+1]
- {
- }
- cout << endl << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement