How to make arithmetical operations in C#?
I'm making a calculator, And I don't know what signs needs to be for Addition, Subtraction and Division.
Thanks for help
I'm making a calculator, And I don't know what signs needs to be for Addition, Subtraction and Division.
Calculator:
if (aritmeticalOperation == "Multiplication") //It can be other operation too.
{
long num01;
Int64 num02;
Console.Write("\n\nType a number to be multiplied: ");
num01 = Convert.ToInt64(Console.ReadLine());
Console.Write("Type another number: ");
num02 = Convert.ToInt64(Console.ReadLine());
Console.WriteLine("\nThe result is " + num01 * num02); //multiplication works but I don't know what should I put for other operations.
while (Console.ReadKey().Key != ConsoleKey.Enter) ;
}
Thanks for help