Created the 1st solution_3.cpp
This commit is contained in:
parent
a82301cc5b
commit
ae956efbab
26
units/2023_10_19/solution_3.cpp
Normal file
26
units/2023_10_19/solution_3.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#include <iostream>
|
||||
|
||||
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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user