In this program, we ask the user to choose the desired operation. Options 1,2,3 and 4 are valid. Two numbers are taken and an if...elif...else branching is used to execute a particular section. User-defined functions add(), subtract(), multiply() and divide() evaluate respective operations.

Source Code

Output

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here