/
ArtT
/
Netology
Обзор
Документация
Войти
/
ArtT
/
Netology
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Part1/task_1_3_1.cpp
29 строк
595 B
ArtT
Навёл порядок
14 ноя 2025, 15:46
14 ноя 2025, 15:46
27cf136
Код
Авторство
О чём код?
#include <iostream> using namespace std; string f(bool b) { return b ? "true" : "false"; } int main() { bool nBool[] = {true, false}; setlocale(LC_CTYPE, "rus"); cout << "Оператор: ||" << endl; for (int i = 0; i <=1; i++){ for (int j = 0; j <=1; j++){ cout << f(nBool[j]) << ' ' << f(nBool[i]) << ' ' << f(nBool[i] || nBool[j]) << endl; } } cout << endl; cout << "Оператор: &&" << endl; for (int i = 0; i <=1; i++){ for (int j = 0; j <=1; j++){ cout << f(nBool[j]) << ' ' << f(nBool[i]) << ' ' << f(nBool[i] && nBool[j]) << endl; } } return 0; }