Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
simple calculator
#include <iostream> /*simple calculator *29/01/2017 *by samuel ugochukwu */ int main() { char op; float num1,num2; std::cin >>num1; std::cout << "Num1: "<<num1; std::cin >>op; std::cout << "\nopera: "<<op; std::cin >>num2; std::cout << "\nNum2: "<<num2; std::cout << "\nTotal: "; switch(op) { case '+': std::cout <<num1+num2; break; case '-': std::cout<<num1-num2; break; case '*': std::cout <<num1*num2; break; case '/': std::cout<<num1/num2; break; default: std::cout<< "Error! operator is not correct"; break; } return 0; }
run
|
edit
|
history
|
help
0
BridgeEdge
maya angelou
union of two sorted array
20201123
replace_copy-30-Seconds-of-C++
32bit
Factoriel
GCC bug #79511
python
FAK MEN