From f376a8b3ac0dcdf329048ec730c63c48a0dd4920 Mon Sep 17 00:00:00 2001 From: Fingadumbledore <53864355+Fingadumbledore@users.noreply.github.com> Date: Sun, 29 May 2022 17:54:06 +0200 Subject: [PATCH] Version 1.2 --- mate.cpp | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/mate.cpp b/mate.cpp index e90dbcc..1843624 100644 --- a/mate.cpp +++ b/mate.cpp @@ -2,13 +2,12 @@ // Eine Mateflasche = 500 Ml // Das Projekt ist nur zum Spaß und Sollte nicht Ernst genommen werden // Der Konsum von zu viel Zucker und Koffein ist nicht Gesund und kann Gesundheitliche Schäden bewirken +// Version 1.2 #include using namespace std; int main(){ -int mate, Koffeingehalt ; +int mate, Koffeingehalt, marke ; - - cout << " ** ** ** ** \n"; cout << " ** ** ** ++ ** \n"; cout << " **** **** **** ++ **** \n"; @@ -22,21 +21,40 @@ cout << "****************************************************************\n"; cout <<"\n"; cout <<"input: "; cin >> mate; +cout << "Marke [1]Mio Mio Mate [2]Club Mate [3]Flora Mate\n"; +cout << "input: "; +cin >> marke; if (mate < 2){ cout <<"Für einen erfolgreichen Tag benötigst du mehr als 1 Flasche Mate"; } else if (mate > 1){ mate = mate +1; - Koffeingehalt = mate * 100; + switch (marke) + { + case 1: + Koffeingehalt = mate * 100; + break; + case 2: + Koffeingehalt = mate * 100; + break; + case 3: + Koffeingehalt = mate * 90; + break; + + default: + cout << "Dies ist keine gute Sorte\n"; + break; + } + cout <<"du brauchst " <