Console.WriteLine("This is a basic calculator!");
Console.Write("Enter the first number: ");
firstNum = Convert.ToInt32(Console.ReadLine());
Console.Write("Enter your second number: ");
secondNum = Convert.ToInt32(Console.ReadLine());
Console.Write("Enter your operation ( x , / , +, -): ");
operation = Console.ReadLine();
Console.WriteLine("Results");
public static void Main(String[] args)
answer = firstNum * secondNum;
else if (operation == "/")
answer = firstNum / secondNum;
else if (operation == "+")
answer = firstNum + secondNum;
else if (operation == "-")
answer = firstNum - secondNum;
static void DisplayResult()
Console.WriteLine(firstNum + " x " + secondNum + " = " + answer);
else if (operation == "/")
Console.WriteLine(firstNum + " / " + secondNum + " = " + answer);
else if (operation == "+")
Console.WriteLine(firstNum + " + " + secondNum + " = " + answer);
else if (operation == "-")
Console.WriteLine(firstNum + " - " + secondNum + " = " + answer);
Console.WriteLine("Sorry that is not correct format! Please restart!");