For the problem "Make your calculator program perform computations in a separate function for each type ofcomputation." I have done thisBut its pretty much long. have I done it in the right process?? or there is a simpler way to do it??Code:#include <iostream> using namespace std; int add (int x, int y) { return x+y; } int subtract(int x,int y) { return x-y; } int divide(int x,int y) { return x/y; } int multiply(int x,int y) { return x*y; } int main() { while (true) { int x; int y; string arg; cout<<"please enter a number"; cin>>x; cout<<"enter argument"; cin>>arg; cout<<"enter another number"; cin>>y; if (arg=="+") { cout<<add(x,y); break; } else if (arg=="-") { cout<<subtract(x,y); break; } else if(arg=="*") { cout<<multiply(x,y); break; } else if(arg=="/") { cout<<divide(x,y); break; } else { cout<<"wrong input, enter again"; } } }