C++ · ОСНОВЫ · LESSON 05
Choosing a path
if and else · about 12 minutes
Learning with progressRead the summary for free. To save the work, log in to the account.
Type the code yourself
Manually type the program from the sample. So you'll remember commands and brackets.
#include <iostream>
using namespace std;
int main() {
int points = 7;
if (points >= 5) {
cout << "Супер" << endl;
} else {
cout << "Попробуй ещё" << endl;
}
return 0;
}Open the editor for class workSolve it yourself
Create int score = 3. If score is at least 5, output «Сдано», otherwise «Тренируйся».
The answer is hidden. Use similar examples from the lesson notes.
Opening up your homework