diff --git a/Uebung 1/Algorithms.h b/Uebung 1/Algorithms.h new file mode 100644 index 0000000..0f06185 --- /dev/null +++ b/Uebung 1/Algorithms.h @@ -0,0 +1,11 @@ +#pragma once +#include "Sortiment.h" +#include + +void bubbleSort(Ware *waren[10]) { + for (int i = 0; i < 10; i++) { + if (waren[i] > waren[i + 1]) { + std::swap(waren[i], waren[i + 1]); + } + } +} \ No newline at end of file