Created the 1st solution.cpp
This commit is contained in:
parent
c61a52bd12
commit
30cd6ed9e1
18
units/2023_10_19/solution.cpp
Normal file
18
units/2023_10_19/solution.cpp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
// Variablen deklarieren
|
||||||
|
int amount, price;
|
||||||
|
|
||||||
|
// Benutzer nach Menge und Einzelpreis fragen
|
||||||
|
cout << "Geben Sie die Menge ein: ";
|
||||||
|
cin >> amount;
|
||||||
|
|
||||||
|
cout << "Geben Sie den Einzelpreis ein: ";
|
||||||
|
cin >> price;
|
||||||
|
|
||||||
|
// Ergebnis ausgeben
|
||||||
|
cout << "Der Gesamtpreis betraegt " << amount * price << " Euro." << endl;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user