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
Palindromo
ExceptionHandling1
Test
IAR compiler bug test code
semiprog.cpp
sejmie
infix to postfix v 5.0 (with exponent support)
Radix sort
exception
BFS Basic