commit 4175258de70411399102c391dda7d2d9ab897044 Author: heydeman Date: Thu Apr 9 06:47:58 2026 +0200 inital commit, adding all school projects diff --git a/Anlageberechnung b/Anlageberechnung new file mode 160000 index 0000000..b2fe617 --- /dev/null +++ b/Anlageberechnung @@ -0,0 +1 @@ +Subproject commit b2fe6172ea365a43e70ff6b567f9e9471a04c3d5 diff --git a/ArbeitStundenRechner/.idea/.gitignore b/ArbeitStundenRechner/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/ArbeitStundenRechner/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/ArbeitStundenRechner/.idea/ArbeitStundenRechner.iml b/ArbeitStundenRechner/.idea/ArbeitStundenRechner.iml new file mode 100644 index 0000000..f08604b --- /dev/null +++ b/ArbeitStundenRechner/.idea/ArbeitStundenRechner.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/ArbeitStundenRechner/.idea/dictionaries/project.xml b/ArbeitStundenRechner/.idea/dictionaries/project.xml new file mode 100644 index 0000000..0c2c227 --- /dev/null +++ b/ArbeitStundenRechner/.idea/dictionaries/project.xml @@ -0,0 +1,8 @@ + + + + dienstag + überstunden + + + \ No newline at end of file diff --git a/ArbeitStundenRechner/.idea/editor.xml b/ArbeitStundenRechner/.idea/editor.xml new file mode 100644 index 0000000..963c96f --- /dev/null +++ b/ArbeitStundenRechner/.idea/editor.xml @@ -0,0 +1,344 @@ + + + + + \ No newline at end of file diff --git a/ArbeitStundenRechner/.idea/misc.xml b/ArbeitStundenRechner/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/ArbeitStundenRechner/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/ArbeitStundenRechner/.idea/modules.xml b/ArbeitStundenRechner/.idea/modules.xml new file mode 100644 index 0000000..11742f9 --- /dev/null +++ b/ArbeitStundenRechner/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ArbeitStundenRechner/CMakeLists.txt b/ArbeitStundenRechner/CMakeLists.txt new file mode 100644 index 0000000..3313a91 --- /dev/null +++ b/ArbeitStundenRechner/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.0) +project(ArbeitStundenRechner) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(ArbeitStundenRechner main.cpp) diff --git a/ArbeitStundenRechner/main.cpp b/ArbeitStundenRechner/main.cpp new file mode 100644 index 0000000..b8998ee --- /dev/null +++ b/ArbeitStundenRechner/main.cpp @@ -0,0 +1,31 @@ +#include + +using namespace std; + +int main() { + const string weekdays[5] = {"Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag"}; + float workHours[5]; + float totalHours = 0; + + for (int i = 0; i < size(weekdays); i++) { + cout << "Wie viel hast du am " << weekdays[i] << " gearbeitet?" << endl; + cin >> workHours[i]; + } + + for (const float workHour: workHours) { + totalHours = totalHours + workHour; + } + + cout << endl << "Insgesamt sind das " << totalHours << " Stunden." << endl; + + if (totalHours < 40) { + float missingHours = 0; + missingHours = 40 - totalHours; + cout << "Du hast nicht genug gearbeitet. du hast " << missingHours << " Stunden zu wenig gearbeitet."; + } else { + float overtime = 0; + overtime = totalHours - 40; + cout << "Du hast genug gearbeitet. du hast ganze " << overtime << " Ueberstunden" << endl; + } + return 0; +} diff --git a/BMI/.idea/.gitignore b/BMI/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/BMI/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/BMI/.idea/BMI.iml b/BMI/.idea/BMI.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/BMI/.idea/BMI.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/BMI/.idea/editor.xml b/BMI/.idea/editor.xml new file mode 100644 index 0000000..ca29dcc --- /dev/null +++ b/BMI/.idea/editor.xml @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/BMI/.idea/misc.xml b/BMI/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/BMI/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/BMI/.idea/modules.xml b/BMI/.idea/modules.xml new file mode 100644 index 0000000..1519d0b --- /dev/null +++ b/BMI/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/BMI/CMakeLists.txt b/BMI/CMakeLists.txt new file mode 100644 index 0000000..a83250a --- /dev/null +++ b/BMI/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project(BMI) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(BMI main.cpp) diff --git a/BMI/main.cpp b/BMI/main.cpp new file mode 100644 index 0000000..db56a49 --- /dev/null +++ b/BMI/main.cpp @@ -0,0 +1,27 @@ +#include +#include +#include + +using namespace std; + + +float BMI(float a, float b) { + return a/(b*b); +} + +int main() { + SetConsoleOutputCP(CP_UTF8); + cout << fixed << setprecision(2); + + cout << "BMI-RECHNER" << endl; + cout << "-----------" << endl; + float Gewicht,Groesse; + cout << "bitte geben Sie die geforderten Daten an!" << endl; + cout << left << setw(20) << "Gewicht(in Kg):"; + cin >> Gewicht; + cout << left << setw(22) << "Größe(in M):"; + cin >> Groesse; + + cout << endl << "BMI: \t\t\t" << BMI(Gewicht, Groesse); + return 0; +} \ No newline at end of file diff --git a/BenzinRechner b/BenzinRechner new file mode 160000 index 0000000..fe43179 --- /dev/null +++ b/BenzinRechner @@ -0,0 +1 @@ +Subproject commit fe431790ae77c96a7229a97148cda014f37e36e2 diff --git a/BlackFriday/.idea/.gitignore b/BlackFriday/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/BlackFriday/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/BlackFriday/.idea/BlackFriday.iml b/BlackFriday/.idea/BlackFriday.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/BlackFriday/.idea/BlackFriday.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/BlackFriday/.idea/editor.xml b/BlackFriday/.idea/editor.xml new file mode 100644 index 0000000..8d0e15e --- /dev/null +++ b/BlackFriday/.idea/editor.xml @@ -0,0 +1,345 @@ + + + + + \ No newline at end of file diff --git a/BlackFriday/.idea/misc.xml b/BlackFriday/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/BlackFriday/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/BlackFriday/.idea/modules.xml b/BlackFriday/.idea/modules.xml new file mode 100644 index 0000000..f9bf34c --- /dev/null +++ b/BlackFriday/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/BlackFriday/CMakeLists.txt b/BlackFriday/CMakeLists.txt new file mode 100644 index 0000000..9e08315 --- /dev/null +++ b/BlackFriday/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project(BlackFriday) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(BlackFriday main.cpp) diff --git a/BlackFriday/main.cpp b/BlackFriday/main.cpp new file mode 100644 index 0000000..2427012 --- /dev/null +++ b/BlackFriday/main.cpp @@ -0,0 +1,38 @@ +#include +#include +#include + +using namespace std; + +int main() { + + SetConsoleOutputCP(CP_UTF8); + cout << fixed << setprecision(2); + + cout << "\t \t"; + cout << "R A B A T T R E C H N E R" << endl; + cout << "\t \t"; + cout << "-------------------------"; + cout << endl; + + float fBestellwert = 0; + cout << "Bitte geben Sie den Gesamtwert der Bestellung ein: "; + cin >> fBestellwert; + + cout << endl; + + if (fBestellwert >=1000) { + cout << "Es wurde ein Rabatt von 10% angewendet!" << endl; + cout << "Der zu zahlende Betragt beträgt somit: \t\t"; + + fBestellwert *= 0.9; + cout << fBestellwert << " EUR."; + } else { + cout << "Der zu zahlende Betrag beträgt " << fBestellwert << "EUR."; + } + + cout << endl; + system("pause"); + + return 0; +} \ No newline at end of file diff --git a/Brauerrei/.idea/.gitignore b/Brauerrei/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/Brauerrei/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/Brauerrei/.idea/Brauerrei.iml b/Brauerrei/.idea/Brauerrei.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/Brauerrei/.idea/Brauerrei.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Brauerrei/.idea/editor.xml b/Brauerrei/.idea/editor.xml new file mode 100644 index 0000000..8d0e15e --- /dev/null +++ b/Brauerrei/.idea/editor.xml @@ -0,0 +1,345 @@ + + + + + \ No newline at end of file diff --git a/Brauerrei/.idea/misc.xml b/Brauerrei/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/Brauerrei/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/Brauerrei/.idea/modules.xml b/Brauerrei/.idea/modules.xml new file mode 100644 index 0000000..f38e2cf --- /dev/null +++ b/Brauerrei/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Brauerrei/CMakeLists.txt b/Brauerrei/CMakeLists.txt new file mode 100644 index 0000000..95a23cc --- /dev/null +++ b/Brauerrei/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project(Brauerrei) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(Brauerrei main.cpp) diff --git a/Brauerrei/main.cpp b/Brauerrei/main.cpp new file mode 100644 index 0000000..4a807a7 --- /dev/null +++ b/Brauerrei/main.cpp @@ -0,0 +1,38 @@ +#include +#include +#include +using namespace std; + +int main() { + // Konsolen konfiguration + SetConsoleOutputCP(CP_UTF8); + cout << fixed << setprecision(2); + + // Variablen + int iBierkaesten = 0; + float fRabatt = 0.0; + + string running = "Ja"; + while (running == "Ja" || running == "ja") { + // Nutzer input + cout << "Wie viele Kästen werden es denn heute? "; + cin >> iBierkaesten; + cout << endl; + + if (iBierkaesten >= 100) { + fRabatt = 0.1; + } else if (iBierkaesten >= 50) { + fRabatt = 0.07; + } else if (iBierkaesten >= 10) { + fRabatt = 0.05; + } + + cout << "so! jetzt aber! du hast ganze " << iBierkaesten << " gekauft?? Du bist a G'scheider! Dafür gibts " << + fRabatt * 100 << "% Rabatt! Für dich!" << endl; + + cout << endl << "so! jetzt das ganze nochmal? Hinweis: Ja, oder nein. "; + cin >> running; + } + system("pause"); + return (0); +} diff --git a/FlächeeinesRechtecks/.idea/.gitignore b/FlächeeinesRechtecks/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/FlächeeinesRechtecks/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/FlächeeinesRechtecks/.idea/.name b/FlächeeinesRechtecks/.idea/.name new file mode 100644 index 0000000..c85b7dd --- /dev/null +++ b/FlächeeinesRechtecks/.idea/.name @@ -0,0 +1 @@ +FlaecheeinesRechtecks \ No newline at end of file diff --git a/FlächeeinesRechtecks/.idea/FlächeeinesRechtecks.iml b/FlächeeinesRechtecks/.idea/FlächeeinesRechtecks.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/FlächeeinesRechtecks/.idea/FlächeeinesRechtecks.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/FlächeeinesRechtecks/.idea/editor.xml b/FlächeeinesRechtecks/.idea/editor.xml new file mode 100644 index 0000000..ca29dcc --- /dev/null +++ b/FlächeeinesRechtecks/.idea/editor.xml @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/FlächeeinesRechtecks/.idea/misc.xml b/FlächeeinesRechtecks/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/FlächeeinesRechtecks/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/FlächeeinesRechtecks/.idea/modules.xml b/FlächeeinesRechtecks/.idea/modules.xml new file mode 100644 index 0000000..a59fa0a --- /dev/null +++ b/FlächeeinesRechtecks/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/FlächeeinesRechtecks/CMakeLists.txt b/FlächeeinesRechtecks/CMakeLists.txt new file mode 100644 index 0000000..df2ca86 --- /dev/null +++ b/FlächeeinesRechtecks/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project(FlaecheeinesRechtecks) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(FlaecheeinesRechtecks main.cpp) diff --git a/FlächeeinesRechtecks/main.cpp b/FlächeeinesRechtecks/main.cpp new file mode 100644 index 0000000..6102edf --- /dev/null +++ b/FlächeeinesRechtecks/main.cpp @@ -0,0 +1,27 @@ +#include +#include +#include + +using namespace std; + +int rechteck(const int a, const int b) { + return a*b; +} + +int main() { + SetConsoleOutputCP(CP_UTF8); + cout << fixed << setprecision(2); + + int input1, input2; + + cout << "Input 1: \n"; + cin >> input1; + cout << endl; + + cout << "Input 2: \n"; + cin >> input2; + + system("cls"); + + cout << "Ergebnis: " << rechteck(input1, input2); +} \ No newline at end of file diff --git a/KalorienRechner/.idea/.gitignore b/KalorienRechner/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/KalorienRechner/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/KalorienRechner/.idea/KalorienRechner.iml b/KalorienRechner/.idea/KalorienRechner.iml new file mode 100644 index 0000000..f08604b --- /dev/null +++ b/KalorienRechner/.idea/KalorienRechner.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/KalorienRechner/.idea/editor.xml b/KalorienRechner/.idea/editor.xml new file mode 100644 index 0000000..963c96f --- /dev/null +++ b/KalorienRechner/.idea/editor.xml @@ -0,0 +1,344 @@ + + + + + \ No newline at end of file diff --git a/KalorienRechner/.idea/misc.xml b/KalorienRechner/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/KalorienRechner/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/KalorienRechner/.idea/modules.xml b/KalorienRechner/.idea/modules.xml new file mode 100644 index 0000000..82ab527 --- /dev/null +++ b/KalorienRechner/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/KalorienRechner/.vscode/settings.json b/KalorienRechner/.vscode/settings.json new file mode 100644 index 0000000..266ce0a --- /dev/null +++ b/KalorienRechner/.vscode/settings.json @@ -0,0 +1,48 @@ +{ + "files.associations": { + "iostream": "cpp", + "array": "cpp", + "atomic": "cpp", + "bit": "cpp", + "cctype": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "compare": "cpp", + "concepts": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdint": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "deque": "cpp", + "string": "cpp", + "unordered_map": "cpp", + "vector": "cpp", + "exception": "cpp", + "algorithm": "cpp", + "functional": "cpp", + "iterator": "cpp", + "memory": "cpp", + "memory_resource": "cpp", + "numeric": "cpp", + "optional": "cpp", + "random": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "utility": "cpp", + "initializer_list": "cpp", + "iosfwd": "cpp", + "istream": "cpp", + "limits": "cpp", + "new": "cpp", + "numbers": "cpp", + "ostream": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "typeinfo": "cpp" + } +} \ No newline at end of file diff --git a/KalorienRechner/.vscode/tasks.json b/KalorienRechner/.vscode/tasks.json new file mode 100644 index 0000000..08d9005 --- /dev/null +++ b/KalorienRechner/.vscode/tasks.json @@ -0,0 +1,28 @@ +{ + "tasks": [ + { + "type": "cppbuild", + "label": "C/C++: gcc build active file", + "command": "/usr/bin/gcc", + "args": [ + "-fdiagnostics-color=always", + "-g", + "${file}", + "-o", + "${fileDirname}/${fileBasenameNoExtension}" + ], + "options": { + "cwd": "${fileDirname}" + }, + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "detail": "Task generated by Debugger." + } + ], + "version": "2.0.0" +} \ No newline at end of file diff --git a/KalorienRechner/CMakeLists.txt b/KalorienRechner/CMakeLists.txt new file mode 100644 index 0000000..fc4fbe1 --- /dev/null +++ b/KalorienRechner/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.0) +project(KalorienRechner) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(KalorienRechner main.cpp) diff --git a/KalorienRechner/main.cpp b/KalorienRechner/main.cpp new file mode 100644 index 0000000..f858ab1 --- /dev/null +++ b/KalorienRechner/main.cpp @@ -0,0 +1,20 @@ +#include +using namespace std; + +int main() { + + double gewicht = 0; + double strecke = 0; + double VerbrauchteKalorien = 0; + + cout << "Wie viel wiegst du? "; + cin >> gewicht; + + cout << "Wie weit bist du gelaufen? "; + cin >> strecke; + + VerbrauchteKalorien = 0.9 * gewicht * strecke; + cout << "Du hast ca. " << VerbrauchteKalorien << " verbrannt." << "\n"; + cin.get(); cin.get(); + return 0; +} \ No newline at end of file diff --git a/KalorienRechner/output/main b/KalorienRechner/output/main new file mode 100644 index 0000000..23e60c4 Binary files /dev/null and b/KalorienRechner/output/main differ diff --git a/Kinosaalreservierung/.idea/.gitignore b/Kinosaalreservierung/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/Kinosaalreservierung/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/Kinosaalreservierung/.idea/Kinosaalreservierung.iml b/Kinosaalreservierung/.idea/Kinosaalreservierung.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/Kinosaalreservierung/.idea/Kinosaalreservierung.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Kinosaalreservierung/.idea/editor.xml b/Kinosaalreservierung/.idea/editor.xml new file mode 100644 index 0000000..ca29dcc --- /dev/null +++ b/Kinosaalreservierung/.idea/editor.xml @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/Kinosaalreservierung/.idea/misc.xml b/Kinosaalreservierung/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/Kinosaalreservierung/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/Kinosaalreservierung/.idea/modules.xml b/Kinosaalreservierung/.idea/modules.xml new file mode 100644 index 0000000..690bd14 --- /dev/null +++ b/Kinosaalreservierung/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Kinosaalreservierung/CMakeLists.txt b/Kinosaalreservierung/CMakeLists.txt new file mode 100644 index 0000000..53a0044 --- /dev/null +++ b/Kinosaalreservierung/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project(Kinosaalreservierung) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(Kinosaalreservierung main.cpp) diff --git a/Kinosaalreservierung/main.cpp b/Kinosaalreservierung/main.cpp new file mode 100644 index 0000000..aec2d0c --- /dev/null +++ b/Kinosaalreservierung/main.cpp @@ -0,0 +1,25 @@ +#include +#include +#include + +using namespace std; + +int sitze[10] = {0,0,0,0,0,0,0,0,0}; +bool gefunden = false; + +int main() { + SetConsoleOutputCP(CP_UTF8); + cout << fixed << setprecision(2); + + for (int i = 0; i < 8; i++) { + if (sitze[i] == 0 && sitze[i+1] == 0) { + gefunden = true; + cout << "Plätze gefunden bei Nummer " << i << " und Nummer " << i+1 << endl; + } + } + if (!gefunden) { + cout << "Leider keinen freien platz gefunden" << endl; + } + system("Pause"); + return 0; +} \ No newline at end of file diff --git a/MonatlicheUmsaetze/.idea/.gitignore b/MonatlicheUmsaetze/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/MonatlicheUmsaetze/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/MonatlicheUmsaetze/.idea/MonatlicheUmsaetze.iml b/MonatlicheUmsaetze/.idea/MonatlicheUmsaetze.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/MonatlicheUmsaetze/.idea/MonatlicheUmsaetze.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/MonatlicheUmsaetze/.idea/editor.xml b/MonatlicheUmsaetze/.idea/editor.xml new file mode 100644 index 0000000..ca29dcc --- /dev/null +++ b/MonatlicheUmsaetze/.idea/editor.xml @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/MonatlicheUmsaetze/.idea/misc.xml b/MonatlicheUmsaetze/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/MonatlicheUmsaetze/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/MonatlicheUmsaetze/.idea/modules.xml b/MonatlicheUmsaetze/.idea/modules.xml new file mode 100644 index 0000000..8040edf --- /dev/null +++ b/MonatlicheUmsaetze/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/MonatlicheUmsaetze/CMakeLists.txt b/MonatlicheUmsaetze/CMakeLists.txt new file mode 100644 index 0000000..ef46268 --- /dev/null +++ b/MonatlicheUmsaetze/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project(MonatlicheUmsaetze) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(MonatlicheUmsaetze main.cpp) diff --git a/MonatlicheUmsaetze/main.cpp b/MonatlicheUmsaetze/main.cpp new file mode 100644 index 0000000..a9c6089 --- /dev/null +++ b/MonatlicheUmsaetze/main.cpp @@ -0,0 +1,50 @@ +#include +#include +#include + +using namespace std; + +std::string formatMoneyGerman(double amount) { + std::ostringstream oss; + oss << std::fixed << std::setprecision(2) << amount; + std::string s = oss.str(); + + // Replace decimal point with comma + size_t dotPos = s.find('.'); + if (dotPos != std::string::npos) + s[dotPos] = ','; + + // Insert thousands separator (dot) every three digits before comma + int insertPos = static_cast(dotPos) - 3; + while (insertPos > 0) { + s.insert(insertPos, "."); + insertPos -= 3; + } + + return s + " €"; +} + +int main() { + SetConsoleOutputCP(CP_UTF8); + cout << fixed << setprecision(2); + + double Umsatz[12], summe = 0; + + cout << "Monatliche Umsätze:"; + cout << endl << "--------------------"; + + cout << endl << endl << "Bitte geben Sie die Umsätze der letzten Monate ein!" << endl; + + for (int i = 0; i < 12; i++ ) { + cout << endl << "Umsatz für Monat [" << i + 1 << "]: "; + cin >> Umsatz[i]; + summe += Umsatz[i]; + } + cout << endl << "Die Summe aller monatlichen Umsätze beträgt: " << formatMoneyGerman(summe) << endl; + cout << "Der durchschnittliche monatliche Umsatz beträgt: " << formatMoneyGerman(summe / 12) << endl; + cout << endl; + cout << "Für welchen Monat soll der Umsatz angezeigt werden?" << endl; + cout << "Bitte geben Sie eine Zahl zwischen 1 und 12 an:"; + system("pause"); + return 0; +} \ No newline at end of file diff --git a/PROV/.idea/.gitignore b/PROV/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/PROV/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/PROV/.idea/PROV.iml b/PROV/.idea/PROV.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/PROV/.idea/PROV.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/PROV/.idea/editor.xml b/PROV/.idea/editor.xml new file mode 100644 index 0000000..ca29dcc --- /dev/null +++ b/PROV/.idea/editor.xml @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/PROV/.idea/misc.xml b/PROV/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/PROV/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/PROV/.idea/modules.xml b/PROV/.idea/modules.xml new file mode 100644 index 0000000..4f1296c --- /dev/null +++ b/PROV/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/PROV/CMakeLists.txt b/PROV/CMakeLists.txt new file mode 100644 index 0000000..ac5ee7f --- /dev/null +++ b/PROV/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project(PROV) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(PROV main.cpp) diff --git a/PROV/main.cpp b/PROV/main.cpp new file mode 100644 index 0000000..1bb2ca5 --- /dev/null +++ b/PROV/main.cpp @@ -0,0 +1,29 @@ +#include +#include +#include + +using namespace std; + +int main() { + SetConsoleOutputCP(CP_UTF8); + cout << fixed << setprecision(2); + + cout << "\t \t" << "Umsatzprovision" << endl; + cout << "\t \t" << "---------------" << endl; + + float fUmsatz = 0; + float fProvisionssatz = 0.05; + float fProvision = 0; + cout << endl << "so bürschle! wie viel geld haste denn verdient? "; + cin >> fUmsatz; + + if (fUmsatz >= 100000) { + fProvisionssatz = 0.07; + } + + fProvision = fUmsatz * fProvisionssatz; + cout << "Du bekommst bei einem Provisionssatz von " << fProvisionssatz * 100 <<"% ganze " << fProvision << " Eur. Viel Spaß damit, großer!" << endl; + + system("pause"); + return 0; +} \ No newline at end of file diff --git a/Parkautomat/.idea/.gitignore b/Parkautomat/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/Parkautomat/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/Parkautomat/.idea/Parkautomat.iml b/Parkautomat/.idea/Parkautomat.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/Parkautomat/.idea/Parkautomat.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Parkautomat/.idea/editor.xml b/Parkautomat/.idea/editor.xml new file mode 100644 index 0000000..8d0e15e --- /dev/null +++ b/Parkautomat/.idea/editor.xml @@ -0,0 +1,345 @@ + + + + + \ No newline at end of file diff --git a/Parkautomat/.idea/misc.xml b/Parkautomat/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/Parkautomat/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/Parkautomat/.idea/modules.xml b/Parkautomat/.idea/modules.xml new file mode 100644 index 0000000..4075323 --- /dev/null +++ b/Parkautomat/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Parkautomat/CMakeLists.txt b/Parkautomat/CMakeLists.txt new file mode 100644 index 0000000..7ba2ca5 --- /dev/null +++ b/Parkautomat/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project(Parkautomat) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(Parkautomat main.cpp) diff --git a/Parkautomat/main.cpp b/Parkautomat/main.cpp new file mode 100644 index 0000000..ca2f621 --- /dev/null +++ b/Parkautomat/main.cpp @@ -0,0 +1,79 @@ + +#include +#include // für numeric_limits +#include // für fixed und setprecision +#include + +double berechneKosten(int stunden) { + double kosten = 0.0; + + switch (stunden) { + case 1: + kosten = 3.00; + break; + case 2: + kosten = 3.00 + 2.50; // 5,50 € + break; + case 3: + kosten = 3.00 + 2.50 + 2.00; // 7,50 € + break; + default: + if (stunden >= 4) { + kosten = 3.00 + 2.50 + 2.00; // erste 3 Stunden = 7,50 € + kosten += (stunden - 3) * 1.00; // ab 4. Stunde je 1,00 € + } else { + // Für 0 oder negative Werte: 0 € (wird aber in der Eingabe schon abgefangen) + kosten = 0.0; + } + break; + } + + return kosten; +} + +int main() { + SetConsoleOutputCP(CP_UTF8); + std::cout << "=== Ticketautomat Parkhaus Stadt Nürnberg ===\n\n"; + std::cout << "Tarife:\n" + << " 1. Stunde: 3,00 €\n" + << " 2. Stunde: 2,50 €\n" + << " 3. Stunde: 2,00 €\n" + << " ab 4. Stunde: jede weitere Stunde 1,00 €\n\n"; + + bool weiter = true; + while (weiter) { + int stunden = 0; + + // Eingabe mit Validierung + while (true) { + std::cout << "Bitte geben Sie die gewünschte Parkdauer in vollen Stunden ein (1 - 24): "; + if (std::cin >> stunden && stunden >= 1 && stunden <= 24) { + break; // gültige Eingabe + } else { + std::cout << "Ungueltige Eingabe. Bitte eine ganze Zahl zwischen 1 und 24 eingeben.\n"; + std::cin.clear(); + std::cin.ignore(std::numeric_limits::max(), '\n'); + } + } + + double kosten = berechneKosten(stunden); + + std::cout << std::fixed << std::setprecision(2); + std::cout << "\n=== Zusammenfassung ===\n"; + std::cout << "Gewaehlte Parkdauer: " << stunden << " Stunde(n)\n"; + std::cout << "Gesamtkosten: " << kosten << " €\n"; + std::cout << "=======================\n\n"; + + char auswahl; + std::cout << "Moechten Sie ein weiteres Ticket berechnen? (j/n): "; + std::cin >> auswahl; + std::cin.ignore(std::numeric_limits::max(), '\n'); + if (auswahl != 'j' && auswahl != 'J') { + weiter = false; + } + std::cout << "\n"; + } + + std::cout << "Vielen Dank! Gute Fahrt.\n"; + return 0; +} diff --git a/QuartalasUmsaetze/.idea/.gitignore b/QuartalasUmsaetze/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/QuartalasUmsaetze/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/QuartalasUmsaetze/.idea/QuartalasUmsaetze.iml b/QuartalasUmsaetze/.idea/QuartalasUmsaetze.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/QuartalasUmsaetze/.idea/QuartalasUmsaetze.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/QuartalasUmsaetze/.idea/editor.xml b/QuartalasUmsaetze/.idea/editor.xml new file mode 100644 index 0000000..8d0e15e --- /dev/null +++ b/QuartalasUmsaetze/.idea/editor.xml @@ -0,0 +1,345 @@ + + + + + \ No newline at end of file diff --git a/QuartalasUmsaetze/.idea/misc.xml b/QuartalasUmsaetze/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/QuartalasUmsaetze/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/QuartalasUmsaetze/.idea/modules.xml b/QuartalasUmsaetze/.idea/modules.xml new file mode 100644 index 0000000..ae06844 --- /dev/null +++ b/QuartalasUmsaetze/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/QuartalasUmsaetze/CMakeLists.txt b/QuartalasUmsaetze/CMakeLists.txt new file mode 100644 index 0000000..1051fd7 --- /dev/null +++ b/QuartalasUmsaetze/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project(QuartalasUmsaetze) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(QuartalasUmsaetze main.cpp) diff --git a/QuartalasUmsaetze/main.cpp b/QuartalasUmsaetze/main.cpp new file mode 100644 index 0000000..6ca4379 --- /dev/null +++ b/QuartalasUmsaetze/main.cpp @@ -0,0 +1,53 @@ +#include +#include +#include + +using namespace std; + +double Monatsumsaetze[12] = {}, monat; +double Summe; +float Durchschnitt; + +bool item_in_array(double item, const double* array, std::size_t size) { + for (std::size_t i = 0; i < size; ++i) { + if (array[i] == item) { + return true; + } + } + return false; +} +void zeige_umsatz_fuer_monat(int local_monat) { + if (item_in_array(local_monat, Monatsumsaetze, 12)) { + cout << "Umsatz Monat[ " << local_monat << "]: " << Monatsumsaetze[local_monat-1] << " EUR" << endl; + } +} + +int main() { + SetConsoleOutputCP(CP_UTF8); + cout << fixed << setprecision(2); + + + cout << "Berechnung Monatsumsätze:"; + cout << endl << "----------------------------------------" << endl << endl; + cout << "Bitte geben Sie die Umsätze der letzten Monate ein!" << endl; + + for (int i = 0; i < 4; i++) { + cout << "Umsatz für " << i+1 << ". Quartal:"; + cin >> Monatsumsaetze[i]; + Summe += Monatsumsaetze[i]; + } + Durchschnitt = Summe / 4; + + cout << endl; + cout << "Die Summe aller monatlichen Umsätze beträgt: \t " << Summe << " EUR" << endl; + cout << "Der durchschnittliche monatliche Umsatz beträgt: " << Durchschnitt << " EUR" << endl; + + cout << endl; + cout << "Bitte geben Sie eine Zahl zwischen 1 und 12 ein:"; + cin >> monat; + cout << endl; + zeige_umsatz_fuer_monat(monat); + + system("PAUSE"); + return 0; +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Rabattrechner/.idea/.gitignore b/Rabattrechner/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/Rabattrechner/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/Rabattrechner/.idea/Rabattrechner.iml b/Rabattrechner/.idea/Rabattrechner.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/Rabattrechner/.idea/Rabattrechner.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Rabattrechner/.idea/editor.xml b/Rabattrechner/.idea/editor.xml new file mode 100644 index 0000000..8d0e15e --- /dev/null +++ b/Rabattrechner/.idea/editor.xml @@ -0,0 +1,345 @@ + + + + + \ No newline at end of file diff --git a/Rabattrechner/.idea/misc.xml b/Rabattrechner/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/Rabattrechner/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/Rabattrechner/.idea/modules.xml b/Rabattrechner/.idea/modules.xml new file mode 100644 index 0000000..f029055 --- /dev/null +++ b/Rabattrechner/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Rabattrechner/CMakeLists.txt b/Rabattrechner/CMakeLists.txt new file mode 100644 index 0000000..eb75979 --- /dev/null +++ b/Rabattrechner/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project(Rabattrechner) + +set(CMAKE_CXX_STANDARD 26) + +add_executable(Rabattrechner main.cpp) diff --git a/Rabattrechner/main.cpp b/Rabattrechner/main.cpp new file mode 100644 index 0000000..0651395 --- /dev/null +++ b/Rabattrechner/main.cpp @@ -0,0 +1,55 @@ +#include + +using namespace std; + +int main() { + //var + string cLoopContinue; + + // print title + string title = "RABATTRECHNER V1.0"; + cout << title << endl; + for (int i = 0; i < title.length(); i++) { + cout << '='; + } + cout << endl << endl; + + do + { + // In loop vars + float fEinzelPreis = 0; + float fRabatt = 0; + float fGesamtpreis = 0; + int iBestellmenge = 0; + + cout << "Bitte geben Sie den Einzelpreis (netto) an: "; + cin >> fEinzelPreis; + + cout << endl << "Bitte geben Sie die Bestellmenge an: "; + cin >> iBestellmenge; + + if (iBestellmenge > 1000) { + fRabatt = 7.5; + } else if (iBestellmenge > 501) { + fRabatt = 5; + } else if (iBestellmenge > 100) { + fRabatt = 2.5; + } + + cout << "Rabattsatz\t\t:\t" << fRabatt << endl; + + fGesamtpreis = (iBestellmenge * fEinzelPreis) * ((100 - fRabatt)/100); + cout << "Gesamtpreis (netto)\t:\t" << fGesamtpreis << endl; + + cout << "Umsatzsteuer (19%)\t:\t" << (fGesamtpreis*0.19) << endl; + + cout << "Gesamtpreis\t\t:\t" << (fGesamtpreis*0.19 + fGesamtpreis) << endl; + + cout << "Nochmal? (j,n) "; + cin >> cLoopContinue; + + + } while (cLoopContinue == "j" || cLoopContinue == "J"); + + return 0; +} diff --git a/ReichRechner/.idea/.gitignore b/ReichRechner/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/ReichRechner/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/ReichRechner/.idea/ReichRechner.iml b/ReichRechner/.idea/ReichRechner.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/ReichRechner/.idea/ReichRechner.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/ReichRechner/.idea/editor.xml b/ReichRechner/.idea/editor.xml new file mode 100644 index 0000000..ca29dcc --- /dev/null +++ b/ReichRechner/.idea/editor.xml @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/ReichRechner/.idea/misc.xml b/ReichRechner/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/ReichRechner/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/ReichRechner/.idea/modules.xml b/ReichRechner/.idea/modules.xml new file mode 100644 index 0000000..a476575 --- /dev/null +++ b/ReichRechner/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ReichRechner/CMakeLists.txt b/ReichRechner/CMakeLists.txt new file mode 100644 index 0000000..8f4dec5 --- /dev/null +++ b/ReichRechner/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project(ReichRechner) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(ReichRechner main.cpp) diff --git a/ReichRechner/main.cpp b/ReichRechner/main.cpp new file mode 100644 index 0000000..16b9ea8 --- /dev/null +++ b/ReichRechner/main.cpp @@ -0,0 +1,27 @@ +#include +#include + +using namespace std; + +int main() { + SetConsoleOutputCP(CP_UTF8); + + float fAnlage, fZinssatz,fEndgeld = 0; + int iJahre = 0; + + cout << "wie viel geld hast du? "; + cin >> fAnlage; + + cout << "Wie viel zinssatz? "; + cin >> fZinssatz; + + fEndgeld = fAnlage; + do + { + fEndgeld += fEndgeld * (fZinssatz/100); + iJahre += 1; + } while (fEndgeld < 1000000); + + cout << iJahre; + return 0; +} diff --git a/Reisekosten-Rechner/.idea/.gitignore b/Reisekosten-Rechner/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/Reisekosten-Rechner/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/Reisekosten-Rechner/.idea/.name b/Reisekosten-Rechner/.idea/.name new file mode 100644 index 0000000..a71fede --- /dev/null +++ b/Reisekosten-Rechner/.idea/.name @@ -0,0 +1 @@ +Reisekosten_Rechner \ No newline at end of file diff --git a/Reisekosten-Rechner/.idea/Reisekosten-Rechner.iml b/Reisekosten-Rechner/.idea/Reisekosten-Rechner.iml new file mode 100644 index 0000000..f08604b --- /dev/null +++ b/Reisekosten-Rechner/.idea/Reisekosten-Rechner.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Reisekosten-Rechner/.idea/editor.xml b/Reisekosten-Rechner/.idea/editor.xml new file mode 100644 index 0000000..963c96f --- /dev/null +++ b/Reisekosten-Rechner/.idea/editor.xml @@ -0,0 +1,344 @@ + + + + + \ No newline at end of file diff --git a/Reisekosten-Rechner/.idea/misc.xml b/Reisekosten-Rechner/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/Reisekosten-Rechner/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/Reisekosten-Rechner/.idea/modules.xml b/Reisekosten-Rechner/.idea/modules.xml new file mode 100644 index 0000000..6a334a0 --- /dev/null +++ b/Reisekosten-Rechner/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Reisekosten-Rechner/CMakeLists.txt b/Reisekosten-Rechner/CMakeLists.txt new file mode 100644 index 0000000..e0445ed --- /dev/null +++ b/Reisekosten-Rechner/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.0) +project(Reisekosten_Rechner) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(Reisekosten_Rechner main.cpp) diff --git a/Reisekosten-Rechner/main.cpp b/Reisekosten-Rechner/main.cpp new file mode 100644 index 0000000..825a91d --- /dev/null +++ b/Reisekosten-Rechner/main.cpp @@ -0,0 +1,52 @@ +#include +#include +using namespace std; + +int main() { + SetConsoleOutputCP(CP_UTF8); + const string header[] = { + "R E I S E K O S T E N R E C H N E R", + "------------------------------------", + "\n", + }; + for (const string &j: header) { + cout << j << endl; + } + + double KostenPerPerson; + cout << "Grundpreis der Reise pro Person : \t"; + cin >> KostenPerPerson; + + double AnzahlReisende; + cout << "Anzahl der Reisenden: \t \t \t"; + cin >> AnzahlReisende; + + system("cls"); + + //Ausgabe + const string AusgabeHeader[] = { + " R E I S E K O S T E N R E C H N E R ", + "--------------------------------------", + "\n", + "Pro Reise werden 3% Verpflegungskosten \nund 100 Euro Gewinnpauschale berechnet", + "\n", + "--------------------------------------", + "\n", + "Fuer die Reise ergibt sich ...", + }; + for (const string &j: AusgabeHeader) { + cout << j << endl; + } + double gesamtKosten = (KostenPerPerson * AnzahlReisende) + (KostenPerPerson * AnzahlReisende / 100 * 3) + 100; + cout << "Bei '" << KostenPerPerson << "' EUR Grundpreis pro Person" << endl; + cout << "und '" << AnzahlReisende << "' Reisenden:" << endl; + cout << "\n"; + cout << "Reisepreis \t \t" << KostenPerPerson * AnzahlReisende << endl; + cout << "+ Verpflegungskosten \t" << KostenPerPerson * AnzahlReisende / 100 * 3 << endl; + cout << "+ Gewinnpauschale \t" << 100 << endl << endl; + cout << "--------------------------------------" << endl << endl; + cout << "Gesamtkosten : \t \t" << gesamtKosten << endl << endl; + cout << "--> Preis pro Person: \t \t" << gesamtKosten / AnzahlReisende << " EUR" << endl << endl; + system("pause"); + return 0; +} diff --git a/StromstaerkeRechner/.idea/.gitignore b/StromstaerkeRechner/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/StromstaerkeRechner/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/StromstaerkeRechner/.idea/StromstaerkeRechner.iml b/StromstaerkeRechner/.idea/StromstaerkeRechner.iml new file mode 100644 index 0000000..f08604b --- /dev/null +++ b/StromstaerkeRechner/.idea/StromstaerkeRechner.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/StromstaerkeRechner/.idea/editor.xml b/StromstaerkeRechner/.idea/editor.xml new file mode 100644 index 0000000..ca29dcc --- /dev/null +++ b/StromstaerkeRechner/.idea/editor.xml @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/StromstaerkeRechner/.idea/misc.xml b/StromstaerkeRechner/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/StromstaerkeRechner/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/StromstaerkeRechner/.idea/modules.xml b/StromstaerkeRechner/.idea/modules.xml new file mode 100644 index 0000000..73dd3e8 --- /dev/null +++ b/StromstaerkeRechner/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/StromstaerkeRechner/CMakeLists.txt b/StromstaerkeRechner/CMakeLists.txt new file mode 100644 index 0000000..6cb45d1 --- /dev/null +++ b/StromstaerkeRechner/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.0) +project(StromstaerkeRechner) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(StromstaerkeRechner main.cpp) diff --git a/StromstaerkeRechner/main.cpp b/StromstaerkeRechner/main.cpp new file mode 100644 index 0000000..28fcf09 --- /dev/null +++ b/StromstaerkeRechner/main.cpp @@ -0,0 +1,18 @@ +#include +using namespace std; + +int main() { + double Spannung; + double Widerstand; + + cout << "Stromstärke:" << endl; + cin >> Spannung; + + cout << "Widerstand:" << endl; + cin >> Widerstand; + + double StromStaerke = Spannung / Widerstand; + + cout << StromStaerke << " Ampere"; + return 0; +} \ No newline at end of file diff --git a/Zaehler/.idea/.gitignore b/Zaehler/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/Zaehler/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/Zaehler/.idea/Zaehler.iml b/Zaehler/.idea/Zaehler.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/Zaehler/.idea/Zaehler.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Zaehler/.idea/editor.xml b/Zaehler/.idea/editor.xml new file mode 100644 index 0000000..ca29dcc --- /dev/null +++ b/Zaehler/.idea/editor.xml @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/Zaehler/.idea/misc.xml b/Zaehler/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/Zaehler/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/Zaehler/.idea/modules.xml b/Zaehler/.idea/modules.xml new file mode 100644 index 0000000..d44fa46 --- /dev/null +++ b/Zaehler/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Zaehler/CMakeLists.txt b/Zaehler/CMakeLists.txt new file mode 100644 index 0000000..30bf5b5 --- /dev/null +++ b/Zaehler/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project(Zaehler) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(Zaehler main.cpp) diff --git a/Zaehler/main.cpp b/Zaehler/main.cpp new file mode 100644 index 0000000..ba7ce99 --- /dev/null +++ b/Zaehler/main.cpp @@ -0,0 +1,23 @@ +#include +#include +#include + +using namespace std; + +int main() { + SetConsoleOutputCP(CP_UTF8); + + int Zahl1 = 5, Zahl2 = 10; + cout << "Zahl 1: "; + cin >> Zahl1; + + cout << endl << "Zahl 2: "; + cin >> Zahl2; + + for (int i = Zahl1; i < Zahl2+1; i++) { + cout << i << endl; + usleep(1000000); + } + + return 0; +} \ No newline at end of file diff --git a/ZinsesZinz/.idea/.gitignore b/ZinsesZinz/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/ZinsesZinz/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/ZinsesZinz/.idea/ZinsesZinz.iml b/ZinsesZinz/.idea/ZinsesZinz.iml new file mode 100644 index 0000000..f08604b --- /dev/null +++ b/ZinsesZinz/.idea/ZinsesZinz.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/ZinsesZinz/.idea/editor.xml b/ZinsesZinz/.idea/editor.xml new file mode 100644 index 0000000..ca29dcc --- /dev/null +++ b/ZinsesZinz/.idea/editor.xml @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/ZinsesZinz/.idea/misc.xml b/ZinsesZinz/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/ZinsesZinz/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/ZinsesZinz/.idea/modules.xml b/ZinsesZinz/.idea/modules.xml new file mode 100644 index 0000000..1af28b8 --- /dev/null +++ b/ZinsesZinz/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ZinsesZinz/CMakeLists.txt b/ZinsesZinz/CMakeLists.txt new file mode 100644 index 0000000..d167f19 --- /dev/null +++ b/ZinsesZinz/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.0) +project(ZinsesZinz) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(ZinsesZinz main.cpp) diff --git a/ZinsesZinz/main.cpp b/ZinsesZinz/main.cpp new file mode 100644 index 0000000..8004f2c --- /dev/null +++ b/ZinsesZinz/main.cpp @@ -0,0 +1,27 @@ +#include +#include +using namespace std; + +int main() { + SetConsoleOutputCP(CP_UTF8); + double startKapital; + double Zinssatz; + int Jahre; + + cout << "Wie hoch ist das Startkapital?" << endl; + cin >> startKapital; + + cout << "Wie hoch ist der Zinssatz in Prozent?" << endl; + cin >> Zinssatz; + Zinssatz = Zinssatz / 100; + + cout << "Wie weit soll berechnet werden?" << endl; + cin >> Jahre; + + for (int i = 0; i < Jahre; i++) { + startKapital = startKapital + startKapital * Zinssatz; + } + + cout << "Nach " << Jahre << " Jahren, hast du " << startKapital << " Euro" << "äää"; + return 0; +} \ No newline at end of file diff --git a/animierterText/.idea/.gitignore b/animierterText/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/animierterText/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/animierterText/.idea/animierterText.iml b/animierterText/.idea/animierterText.iml new file mode 100644 index 0000000..f08604b --- /dev/null +++ b/animierterText/.idea/animierterText.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/animierterText/.idea/editor.xml b/animierterText/.idea/editor.xml new file mode 100644 index 0000000..ca29dcc --- /dev/null +++ b/animierterText/.idea/editor.xml @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/animierterText/.idea/misc.xml b/animierterText/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/animierterText/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/animierterText/.idea/modules.xml b/animierterText/.idea/modules.xml new file mode 100644 index 0000000..2456aa0 --- /dev/null +++ b/animierterText/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/animierterText/CMakeLists.txt b/animierterText/CMakeLists.txt new file mode 100644 index 0000000..a8dd97f --- /dev/null +++ b/animierterText/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.0) +project(animierterText) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(animierterText main.cpp) diff --git a/animierterText/main.cpp b/animierterText/main.cpp new file mode 100644 index 0000000..d90e49c --- /dev/null +++ b/animierterText/main.cpp @@ -0,0 +1,13 @@ +#include +#include +#include + +int main() { + std::string text = "Loading"; + for (int i = 0; i < 10; ++i) { + std::cout << "\r" << text << std::string(i % 4, '.') << std::flush; + std::this_thread::sleep_for(std::chrono::milliseconds(300)); + } + std::cout << "\nDone!" << std::endl; + return 0; +} diff --git a/countdown/.idea/.gitignore b/countdown/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/countdown/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/countdown/.idea/countdown.iml b/countdown/.idea/countdown.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/countdown/.idea/countdown.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/countdown/.idea/editor.xml b/countdown/.idea/editor.xml new file mode 100644 index 0000000..ca29dcc --- /dev/null +++ b/countdown/.idea/editor.xml @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/countdown/.idea/misc.xml b/countdown/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/countdown/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/countdown/.idea/modules.xml b/countdown/.idea/modules.xml new file mode 100644 index 0000000..296ce13 --- /dev/null +++ b/countdown/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/countdown/CMakeLists.txt b/countdown/CMakeLists.txt new file mode 100644 index 0000000..947fc8c --- /dev/null +++ b/countdown/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project(countdown) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(countdown main.cpp) diff --git a/countdown/main.cpp b/countdown/main.cpp new file mode 100644 index 0000000..90b8f0b --- /dev/null +++ b/countdown/main.cpp @@ -0,0 +1,21 @@ +#include +#include + +using namespace std; + +int main() { + SetConsoleOutputCP(CP_UTF8); + + // vars + int count = 3; + + cout << "Wie lange soll der Countdown gehen (in sek.)? "; + cin >> count; + + cout << endl; + + for (int i = count; i > 0; i--) { + cout << i << endl; + Sleep(1000); + } +} \ No newline at end of file diff --git a/fake-ping b/fake-ping new file mode 160000 index 0000000..406d739 --- /dev/null +++ b/fake-ping @@ -0,0 +1 @@ +Subproject commit 406d73924e48cc7a15f1a72f776d7730294f6191 diff --git a/funktionen/.idea/.gitignore b/funktionen/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/funktionen/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/funktionen/.idea/editor.xml b/funktionen/.idea/editor.xml new file mode 100644 index 0000000..8d0e15e --- /dev/null +++ b/funktionen/.idea/editor.xml @@ -0,0 +1,345 @@ + + + + + \ No newline at end of file diff --git a/funktionen/.idea/funktionen.iml b/funktionen/.idea/funktionen.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/funktionen/.idea/funktionen.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/funktionen/.idea/misc.xml b/funktionen/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/funktionen/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/funktionen/.idea/modules.xml b/funktionen/.idea/modules.xml new file mode 100644 index 0000000..ece01a5 --- /dev/null +++ b/funktionen/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/funktionen/CMakeLists.txt b/funktionen/CMakeLists.txt new file mode 100644 index 0000000..ffd00fc --- /dev/null +++ b/funktionen/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project(funktionen) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(funktionen main.cpp) diff --git a/funktionen/main.cpp b/funktionen/main.cpp new file mode 100644 index 0000000..ee1c3cc --- /dev/null +++ b/funktionen/main.cpp @@ -0,0 +1,58 @@ +#include +#include +#include + +using namespace std; + +bool eingabe(const int a) { + if (a < 1000 && a > 1) { + return true; + } else { + return false; + } +} + +void zaehler(const int a) { + if (a < 50 && a > 1) { + for (int i = 0; i < a; i++) { + cout << i+1 << ", "; + } + } else { + cout << "falsche Zahl"; + } +} + +double fakultaet(const int n) { + if (n < 0) return 0; // Fakultät für negative Zahlen nicht definiert + double fakultaet = 1; + for (double i = 1; i <= n; ++i) { + fakultaet *= i; + } + return fakultaet; +} + +int main() { + SetConsoleOutputCP(CP_UTF8); + cout << fixed << setprecision(2); + + cout << "1. Eingabe!!!" << endl << "Eine zahl bitte zwischen 1 und 1000: \n"; + int iEingabe; + cin >> iEingabe; + + cout << endl << eingabe(iEingabe); + + + cout << endl << endl << "eine zahl zwischen 1 und 50: \n"; + int iZahl; + cin >> iZahl; + + zaehler(iZahl); + cout << endl; + + cout << endl << endl << "Eine zahl bitte:\n"; + double iFakultaet; + cin >> iFakultaet; + + cout << endl << fakultaet(iFakultaet); + return 0; +} \ No newline at end of file diff --git a/funktionen2/.idea/.gitignore b/funktionen2/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/funktionen2/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/funktionen2/.idea/editor.xml b/funktionen2/.idea/editor.xml new file mode 100644 index 0000000..8d0e15e --- /dev/null +++ b/funktionen2/.idea/editor.xml @@ -0,0 +1,345 @@ + + + + + \ No newline at end of file diff --git a/funktionen2/.idea/funktionen2.iml b/funktionen2/.idea/funktionen2.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/funktionen2/.idea/funktionen2.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/funktionen2/.idea/misc.xml b/funktionen2/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/funktionen2/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/funktionen2/.idea/modules.xml b/funktionen2/.idea/modules.xml new file mode 100644 index 0000000..b0e618e --- /dev/null +++ b/funktionen2/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/funktionen2/CMakeLists.txt b/funktionen2/CMakeLists.txt new file mode 100644 index 0000000..9ca8141 --- /dev/null +++ b/funktionen2/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project(funktionen2) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(funktionen2 main.cpp) diff --git a/funktionen2/main.cpp b/funktionen2/main.cpp new file mode 100644 index 0000000..add85ee --- /dev/null +++ b/funktionen2/main.cpp @@ -0,0 +1,34 @@ +#include +#include +#include + +using namespace std; + +const double mwst = 0.19; + +void ausgabe(double preis) { + cout << "Artikel: " << endl; + cout << "Netto: " << preis << " Euro" << endl; + cout << "MwSt: " << preis * mwst << " Euro" << endl; + cout << "Brutto: " << preis * (1 + mwst) << " Euro"; +} + +int main() { + SetConsoleOutputCP(CP_UTF8); + cout << fixed << setprecision(2); + double preis; + string repeat; + do + { + cout << "Preis:" << endl; + cin >> preis; + + ausgabe(preis); + + cout << endl << endl << "nochmal? (j/n)" << endl; + cin >> repeat; + }while (repeat == "j" || repeat == "J"); + + + return 0; +} diff --git a/gemeinsamerTeiler/.idea/.gitignore b/gemeinsamerTeiler/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/gemeinsamerTeiler/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/gemeinsamerTeiler/.idea/editor.xml b/gemeinsamerTeiler/.idea/editor.xml new file mode 100644 index 0000000..ca29dcc --- /dev/null +++ b/gemeinsamerTeiler/.idea/editor.xml @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/gemeinsamerTeiler/.idea/gemeinsamerTeiler.iml b/gemeinsamerTeiler/.idea/gemeinsamerTeiler.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/gemeinsamerTeiler/.idea/gemeinsamerTeiler.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/gemeinsamerTeiler/.idea/misc.xml b/gemeinsamerTeiler/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/gemeinsamerTeiler/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/gemeinsamerTeiler/.idea/modules.xml b/gemeinsamerTeiler/.idea/modules.xml new file mode 100644 index 0000000..5b39fa5 --- /dev/null +++ b/gemeinsamerTeiler/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/gemeinsamerTeiler/CMakeLists.txt b/gemeinsamerTeiler/CMakeLists.txt new file mode 100644 index 0000000..d57de9f --- /dev/null +++ b/gemeinsamerTeiler/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project(gemeinsamerTeiler) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(gemeinsamerTeiler main.cpp) diff --git a/gemeinsamerTeiler/main.cpp b/gemeinsamerTeiler/main.cpp new file mode 100644 index 0000000..98b4a17 --- /dev/null +++ b/gemeinsamerTeiler/main.cpp @@ -0,0 +1,26 @@ +#include +#include +#include + +using namespace std; + +int ggT(int a, int b) { + while (b != 0) { + int temp = b; + b = a % b; + a = temp; + } + return a; +} + +int main() { + SetConsoleOutputCP(CP_UTF8); + cout << fixed << setprecision(2); + + int a,b; + cout << "Gib die zwei Zahlen ein von denen du den gemeinsamen teiler wissen möchtest: \n"; + cin >> a >> b; + + cout << endl << "Ergebnis: " << ggT(a,b); + return 0; +} \ No newline at end of file diff --git a/produkt3ganzzahlen/.idea/.gitignore b/produkt3ganzzahlen/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/produkt3ganzzahlen/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/produkt3ganzzahlen/.idea/editor.xml b/produkt3ganzzahlen/.idea/editor.xml new file mode 100644 index 0000000..ca29dcc --- /dev/null +++ b/produkt3ganzzahlen/.idea/editor.xml @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/produkt3ganzzahlen/.idea/misc.xml b/produkt3ganzzahlen/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/produkt3ganzzahlen/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/produkt3ganzzahlen/.idea/modules.xml b/produkt3ganzzahlen/.idea/modules.xml new file mode 100644 index 0000000..eb891c8 --- /dev/null +++ b/produkt3ganzzahlen/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/produkt3ganzzahlen/.idea/produkt3ganzzahlen.iml b/produkt3ganzzahlen/.idea/produkt3ganzzahlen.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/produkt3ganzzahlen/.idea/produkt3ganzzahlen.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/produkt3ganzzahlen/CMakeLists.txt b/produkt3ganzzahlen/CMakeLists.txt new file mode 100644 index 0000000..31186f1 --- /dev/null +++ b/produkt3ganzzahlen/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project(produkt3ganzzahlen) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(produkt3ganzzahlen main.cpp) diff --git a/produkt3ganzzahlen/main.cpp b/produkt3ganzzahlen/main.cpp new file mode 100644 index 0000000..1e1bb9d --- /dev/null +++ b/produkt3ganzzahlen/main.cpp @@ -0,0 +1,30 @@ +#include +#include +#include + +using namespace std; + +int summe(const int iA, const int iB, const int iC) { + return iA * iB * iC; +} + +int main() { + SetConsoleOutputCP(CP_UTF8); + cout << fixed << setprecision(1); + + int iInput1, iInput2, iInput3; + + cout << "Erste Zahl? \n"; + cin >> iInput1; + + cout << endl << "Zweite Zahl? \n"; + cin >> iInput2; + + cout << endl << "Dritte Zahl? \n"; + cin >> iInput3; + + system("cls"); + + cout << "Das Ergebnis ist: " << summe(iInput1, iInput2, iInput3); + return 0; +} \ No newline at end of file diff --git a/quadrat/.idea/.gitignore b/quadrat/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/quadrat/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/quadrat/.idea/editor.xml b/quadrat/.idea/editor.xml new file mode 100644 index 0000000..ca29dcc --- /dev/null +++ b/quadrat/.idea/editor.xml @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/quadrat/.idea/misc.xml b/quadrat/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/quadrat/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/quadrat/.idea/modules.xml b/quadrat/.idea/modules.xml new file mode 100644 index 0000000..144ed54 --- /dev/null +++ b/quadrat/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/quadrat/.idea/quadrat.iml b/quadrat/.idea/quadrat.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/quadrat/.idea/quadrat.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/quadrat/CMakeLists.txt b/quadrat/CMakeLists.txt new file mode 100644 index 0000000..c2e672e --- /dev/null +++ b/quadrat/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project(quadrat) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(quadrat main.cpp) diff --git a/quadrat/main.cpp b/quadrat/main.cpp new file mode 100644 index 0000000..0385632 --- /dev/null +++ b/quadrat/main.cpp @@ -0,0 +1,22 @@ +#include +#include +#include + +using namespace std; + +float quadrat(float iSeitenlaenge) { + return iSeitenlaenge * iSeitenlaenge; +} + +int main() { + SetConsoleOutputCP(CP_UTF8); + cout << fixed << setprecision(2); + + float fSeitenlaenge; + + cout << "Wie lange ist eine Seite? \n"; + cin >> fSeitenlaenge; + + cout << endl << "Das ergebnis ist: " << quadrat(fSeitenlaenge); + return 0; +} \ No newline at end of file diff --git a/ternaereOperatoren/.idea/.gitignore b/ternaereOperatoren/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/ternaereOperatoren/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/ternaereOperatoren/.idea/editor.xml b/ternaereOperatoren/.idea/editor.xml new file mode 100644 index 0000000..8d0e15e --- /dev/null +++ b/ternaereOperatoren/.idea/editor.xml @@ -0,0 +1,345 @@ + + + + + \ No newline at end of file diff --git a/ternaereOperatoren/.idea/misc.xml b/ternaereOperatoren/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/ternaereOperatoren/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/ternaereOperatoren/.idea/modules.xml b/ternaereOperatoren/.idea/modules.xml new file mode 100644 index 0000000..3224f61 --- /dev/null +++ b/ternaereOperatoren/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ternaereOperatoren/.idea/ternaereOperatoren.iml b/ternaereOperatoren/.idea/ternaereOperatoren.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/ternaereOperatoren/.idea/ternaereOperatoren.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/ternaereOperatoren/CMakeLists.txt b/ternaereOperatoren/CMakeLists.txt new file mode 100644 index 0000000..add677a --- /dev/null +++ b/ternaereOperatoren/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.0) +project(ternaereOperatoren) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(ternaereOperatoren main.cpp) diff --git a/ternaereOperatoren/main.cpp b/ternaereOperatoren/main.cpp new file mode 100644 index 0000000..dfbabe4 --- /dev/null +++ b/ternaereOperatoren/main.cpp @@ -0,0 +1,18 @@ +#include +using namespace std; +int main() { + int x = 0, y = 0, z = 0; + + cout << "X: "; + cin >> x; + + cout << "Y: "; + cin >> y; + + cout << "Z: "; + cin >> z; + + x = (x == 0 && (y >= 0 && z >= 0)) ? x = y+z: x = x; + cout << x; + return 0; +} \ No newline at end of file