{`
using System;
using System.Collections.Generic;
using System.Text;
namespace Program
{
className Program
{
static void Main(string[] args)
{
int Num1, Num2, output;
char option;
Console.Write("Enter the First Number : ");
Num1 = Convert.ToInt32(Console.ReadLine());
Console.Write("Enter the Second Number : ");
Num2 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Main Menu");
Console.WriteLine("1. Added together or;");
Console.WriteLine("2. Second number subtracted from first number or;");
Console.WriteLine("3. Multiply numbers together or");
Console.WriteLine("4. first number is divided by the second number;");
Console.Write("Enter the option from the above list to perform the task: ");
option = Convert.ToChar(Console.ReadLine());
switch (option)
{
case '1':
output = Num1 + Num2;
Console.WriteLine("The result of Addition is : {0}", output);
break;
case '2':
output = Num1 - Num2;
Console.WriteLine("The result of Subtraction is : {0}", output);
break;
case '3':
output = Num1 * Num2;
Console.WriteLine("The result of Multiplication is : {0}",output);
break;
case '4':
output = Num1 / Num2;
Console.WriteLine("The result of Division is : {0}", output);
break;
default:
Console.WriteLine("Invalid Option");
break;
}
Console.ReadLine();
}
}
}`}
C# Program Output