Logic to perform the +, -, *,? operations