#include <iostream>
#include <string.h>



using namespace std;

int calc(int, int, string);


int main() {	
	
	int num1, num2, total;
	string oper;	

	cout << "Please enter first integer number: ";
	cin >> num1;
	
	cout << "Please enter second integer number: ";
	cin >> num2;
	
	cout << "Please enter operator: ";
	cin >> oper;
	
	total = calc(num1, num2, oper);
	cout << num1 << " "<< oper << " " << num2 << " = " << total << endl;
	
	return 0;
}

int calc(int num1, int num2, string oper) {
	
	int total;
	
	if (oper.compare("plus") == 0) {
		total = num1 + num2;
		return total;	
	}
	
	if (oper == "minus" ) {
		total = num1 - num2;
		return total;	
	}
	
	if (oper.compare("multiply") == 0) {
		total = num1 * num2;
		return total;	
	}
	
	if (oper.compare("divide") == 0) {
		total = num1 / num2;
		return total;	
	}
	
}
