Function Calculator

code:

With Switch Case:

Another easy code: