class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter the problem.\nInclude spaces in between for correct functioning.");
string Problem = Console.ReadLine();
string[] component = Problem.Split(' ');
int operand1 = int.Parse(component[0]);
string operation = (component[1]);
int operand2 = int.Parse(component[2]);
int result = 0;
if (operation == "+")
{
result = Addition(operand1, operand2);
}
else if (operation == "*")
{
result = Product(operand1, operand2);
}
else if (operation == "-")
{
result = Subtraction(operand1, operand2);
}
else if (operation == "/")
{
result = Division(operand1, operand2);
}
Console.WriteLine("Your Result is" + result);
}
static int Addition(int operand1, int operand2)
{
return (operand1 + operand2);
}
static int Product(int operand1, int operand2)
{
return (operand1 * operand2);
}
static int Subtraction(int operand1, int operand2)
{
return (operand1 - operand2);
}
static int Division(int operand1, int operand2)
{
return (operand1 / operand2);
}
}
}