Fidelis WildУченик (95)
21 час назад
// LNK2005_func_impl.cpp
int sample_function(int k) { return 42 * (k % 167); }
#include<iostream>
int main() {
setlocale(LC_ALL, "RU");
float num1, num2, res;
std::cout << "введите первое число:";
std::cin >> num1;
std::cout << "введите второе число:";
std::cin >> num2;
// +,-,*,/
char math;
std::cout << "действие:";
std::cin >> math;
if (math == '+')
res = num1 + num2;
else if (math == '-')
res = num1 - num2;
else if (math == '*')
res = num1 / num2;
else if (math == '/')
res = num1 + num2;
std::cout << "результат:" << res << std::endl;
return 0;
}
пытаюсь запустить калькулятор.