From 6eccd8db4cee05fd3a02ced21ef157692837d74b Mon Sep 17 00:00:00 2001 From: Ayaahmed211 <144380648+Ayaahmed211@users.noreply.github.com> Date: Fri, 29 Sep 2023 21:19:21 +0300 Subject: [PATCH] Add files via upload --- simple calculator.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 simple calculator.cpp diff --git a/simple calculator.cpp b/simple calculator.cpp new file mode 100644 index 0000000..e299b91 --- /dev/null +++ b/simple calculator.cpp @@ -0,0 +1,33 @@ +#include +using namespace std; + +int main() +{ + + char operation; + float x ,y ; + cout<<"Enter the operation (+ or - or * or /) : "<>operation; + cout<<"Enter the two numbers, taking into consideration that the order is important in some operations "<>x>>y; + switch(operation) + { + case'+': + cout<