Вот пример простого калькулятора на C++: ```cpp #include <iostream> using namespace std; int main() { char operation; float operand1, operand2, result; cout << "Введите операцию (+, -, *, /): "; cin >> operation; cout << "Введите первый операнд: "; cin >> operand1; cout << "Введите второй операнд: "; cin >> operand2; switch (operation) { case '+': result = operand1 + operand2; break; case '-': result = operand1 - operand2; break; case '*': result = operand1 * operand2; break; case '/': if (operand2 != 0) { result = operand1 / operand2; } else { cout << "Ошибка! Деление на ноль невозможно."; return 0; } break; default: cout << "Ошибка! Неправильная операция."; return 0; } cout << "Результат: " << result;