Kodewick
Start learning →
Starter←→0 / 86

Press to Order

#085Startercase 'b':3 min

Press a letter on the order machine: a is Milk tea, b is Coffee, c is Soda. a and c are written — add the one for b. This time b was pressed.

Should show
Coffee
main.cpp
#include <iostream>
using namespace std;

int main() {
    char key = 'b';
    switch (key) {
        case 'a':
            cout << "Milk tea" << endl;
            break;
        // your code here: show Coffee when b is pressed
        case 'c':
            cout << "Soda" << endl;
            break;
    }
    return 0;
}
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.