Skip to content
Home
Post Code
Jass (Warcraft III)
Wurst
GUI (Warcraft III)
Galaxy (StarCraft II)
GUI (StarCraft II)
C++
Java
Delphi
Text
Search Code
Compare Code
Uploads
Draw
Create New Drawing
View Drawings
Graph
Log in
#include <iostream>
using namespace std;
int
main
(
)
{
bool winter
=
false
;
char auswahl
,
typ;
cin >> auswahl >> typ;
switch
(
auswahl
)
{
case
'M':
cout <<
"Motor"
<< flush;
case
'S':
cout <<
"Segel"
<< flush;
case
'B':
cout <<
"Boot"
<< flush;
default:
if
(
winter
)
{
if
(
typ
=
=
'S'
)
cout <<
"mitGPS"
<< endl;
else
cout <<
"ohneGPS"
<< endl;
}
}
return
0
;
}
select language
jass
java
delphi
C++
php
GSL
galaxy
visualBasic
> wurst
Text
Markdown
select style
default
bbcode - default
Jasscraft
jasscraft html
visual
lightweight
> lightweightNr
goto line:
Compare with:
text copy window
edit this code
post new code
#include <iostream> using namespace std; int main() { bool winter = false; char auswahl, typ; cin >> auswahl >> typ; switch (auswahl) { case 'M': cout << "Motor" << flush; case 'S': cout << "Segel" << flush; case 'B': cout << "Boot" << flush; default: if(winter){ if(typ == 'S') cout << "mitGPS" << endl; else cout << "ohneGPS" << endl;} } return 0; }