ماشین حساب در محیط کنسول اپلیکشن سی شارپ
static void Main(string[] args)
}
;int n=1
while (n!=0)
}
;Console.Write("Enter Number 1 : ")
;int a = Convert.ToInt32(Console.ReadLine())
;Console.Write("Enter Number 2 : ")
;int b = Convert.ToInt32(Console.ReadLine())
;Console.Write("Please Enter '+'or'-'or'*'or'/' : ")
;()string c = Console.ReadLine
switch (c)
}
;case "+":Console.WriteLine ("Sum= "+sum(a,b))
;break
;case "*":Console.WriteLine("mul= " + mul(a,b))
;break
;case "/":Console.WriteLine("div= " + div(a,b))
;break
;case "-":Console.WriteLine("min= " + min(a,b))
;break
;default:Console.WriteLine(" I'm Sorry ")
;break
{
;Console.Write(" \n--------------------------\n\n")
;Console.Write("Do you keep going ? 1 or 0 : ")
;n= Convert.ToInt32( Console.ReadLine())
{
;()Console.ReadKey
{
public static int sum (int a , int b)
}
;int c
;c = a + b
;return c
{
public static int mul(int a , int b)
}
;int c
;c = a * b
;return c
{
public static int div (int a , int b)
}
;int c
;c = a / b
;return c
{
public static int min(int a , int b)
}
;int c
;c = a + b
;return c
{