Created the 2023_10_23 solution.cpp
This commit is contained in:
parent
9dd9a42691
commit
1f8483917e
26
units/2023_10_23/solution.cpp
Normal file
26
units/2023_10_23/solution.cpp
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
// Variablen deklarieren
|
||||||
|
int zahl1, zahl2;
|
||||||
|
|
||||||
|
// Eingaben einlesen
|
||||||
|
cout << "Bitte geben Sie die erste Zahl ein: ";
|
||||||
|
cin >> zahl1;
|
||||||
|
|
||||||
|
cout << "Bitte geben Sie die zweite Zahl ein: ";
|
||||||
|
cin >> zahl2;
|
||||||
|
|
||||||
|
// Größeren Wert ausgeben
|
||||||
|
if (zahl1 > zahl2) {
|
||||||
|
cout << "Die erste Zahl ist größer als die zweite Zahl. (" << zahl1 << " > " << zahl2 << ")" << endl;
|
||||||
|
} else if (zahl1 < zahl2) {
|
||||||
|
cout << "Die zweite Zahl ist größer als die erste Zahl. (" << zahl2 << " > " << zahl1 << ")" << endl;
|
||||||
|
} else {
|
||||||
|
cout << "Die beiden Zahlen sind gleich groß. (" << zahl1 << " = " << zahl2 << ")" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user