From ae956efbab53442a57875ce3b61e7c1f590284a5 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Thu, 19 Oct 2023 12:36:28 +0200 Subject: [PATCH] Created the 1st solution_3.cpp --- units/2023_10_19/solution_3.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 units/2023_10_19/solution_3.cpp diff --git a/units/2023_10_19/solution_3.cpp b/units/2023_10_19/solution_3.cpp new file mode 100644 index 0000000..cfbcfa4 --- /dev/null +++ b/units/2023_10_19/solution_3.cpp @@ -0,0 +1,26 @@ +#include + +using namespace std; + +int main() { + // Variablendeklaration + double netto, taxes, brutto; + int tables, price; + + cout << "Geben Sie die Anzahl der Tische ein: "; + cin >> tables; + + cout << "Geben Sie den Einzelpreis ein: "; + cin >> price; + + netto = tables * price; + taxes = netto * 0.19; + + brutto = netto + taxes; + + cout << "Nettobetrag: " << netto << " Euro" << endl; + cout << "Mehrwertsteuer: " << taxes << " Euro" << endl; + + cout << "---------------------------------------------------" << endl; + cout << "Bruttobetrag: " << brutto << " Euro" << endl; +} \ No newline at end of file