CMD calculator 0.1 (RU) БЕТА (EN) BETA
(RU) Пожалуйста вот мой 1 проект, Сделал её 2 дня ВНИМАНИЕ тут только дробные числа подходит вот так (22.2) запускаем ярлык всё.
исходный код:
(EN) Please, here is my 1 project, I did it for 2 days. ATTENTION, only fractional numbers are suitable here, so (22.2) we run the shortcut all. the source code:
#include <iostream>
int main()
{
float num1, num2,res;
std::cout << «enter num1: »;
std::cin >> num1;
std::cout << «enter num2: »;
std::cin >> num2;
char math;
std::cout << «enter math symbol: »;
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 << «result: » << res;
return 0;
}
1 комментарий

Оставьте комментарий...

NightWolf47 2 дня
Майнкрафтер
Ееее калькулятор