Kodewick
Start learning →
Starter←→0 / 86

Ticket Price

#073Starterif (age < 12)3 min

A cinema ticket costs 40, but children under 12 pay 20. Show what this person pays. They are 9, so the answer is 20.

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

int main() {
    int age = 9;
    // your code here: show the ticket price for this age
    return 0;
}
Ctrl + Enter runs too
Result

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