BadSector
2011-07-17 07:26:08 UTC
using System;
using System.Collections.Generic;
using System.Text;
namespace Simple_Calculator
{
class Program
{
static void Main(string[] args)
{
float a, b, c;
char op;
Console.WriteLine("Select Operator:");
op = Convert.ToChar(Console.ReadLine());
Console.WriteLine("Enter Two Numbers:");
a = Convert.ToInt32(Console.ReadLine());
b = Convert.ToInt32(Console.ReadLine());
if (op = '+')
{
c = a + b;
Console.WriteLine("The Addition of two num are : +c");
}
else if (op = '-')
{
c = a - b;
Console.WriteLine("the Subtraction of two Numbers are = +c");
}
else if (op = '*')
{
c = a * b;
Console.WriteLine("The Multiplication of two Numbers are = +c");
}
else if (op = '/')
{
c = a / b;
Console.WriteLine("The division of two Numbers are = +c");
}
Console.ReadLine();
}
}
}