I would maybe look into using a "switch" and "case" statement.
These say pretty much: "in case this is selected this must happen..."
You would have to have a variable indicating the users choice between +,-,*,/
The switch statement would be something like as follows:
CODE
Console.WriteLine("Select an operator: +; -; *; /");
Console.Write("Please enter your selection: ")
string s = Console.ReadLine();
//This is the switch case statement.
//...in CASE variable s is selected as *; +; -; / ,
// do something.
switch (s)
{
case "*":
//Put your multiplication code here
break;
case "+":
//Put your addition code here
break;
//Put other case statements here
//always put a default case in to handle if the user
//makes an invalid select
default:
Console.WriteLine("You have not selected a valid operator");
break;
}
I hope this helps you in the right direction...
There may be other ways of doing it... see what the others say too.
Cheers!
This post has been edited by Footsie: 1 Nov, 2007 - 12:33 AM