In the above file , it simply takes two number and 1 operator and gives the resultant output. You need to create a separate function for all particular operators . CREATE separate FUNCTIONS for ALL THE OPERATORS create functions like add() , subtract() etc