As I'm not a guru yet in C++, here are few pointers
- Function names should start with lowercase letters e.g
Minus()
should beminus
- There is no need to have
int
has a return type for your function.void
is a valid return type and it means return nothing. This would save you the lines ofreturn 0
- Your
divide
andmultiply
functions may be prone to erroneous output. This casts your answer to int - Avoid
using namespace std
because when you use additional libraries clashes may occur. Instead use qualified names e.g std::cout, std::endl etc - I see duplicate codes, DRY up your main function. Make first and second numbers global so this can be read once and it's outside your if statement
- At this point, I will opt for a
switch
statement to make yourmain
cleaner - To make this robust, you probably have to check for if invalid input was typed by the user