Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- void sortuj(std::vector<short int>& cyfry) {
- auto n{ cyfry.size() };
- for (short int i = 0; i < n - 1; ++i) {
- for (short int j = 0; j < n - i - 1; ++j) {
- if (cyfry[j] > cyfry[j + 1]) {
- std::swap(cyfry[j], cyfry[j + 1]);
- }
- }
- }
- }
- std::vector<short int> wygeneruj_pierwszy_ciag(int liczba) {
- std::vector<short int> wynik{};
- while (liczba > 0) {
- wynik.push_back(liczba % 10);
- liczba /= 10;
- }
- sortuj(wynik);
- return wynik;
- }
- unsigned long long wygeneruj_liczbe_z_ciagu(const std::vector<short int>& ciag) {
- }
- int main() {
- unsigned long long a;
- int b;
- std::cout << "Podaj dwie liczby calkowite (oddzielone spacja): ";
- std::cin >> a >> b;
- return 0;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement