I am trying to make a simple calculator for my code and I wanted to know, how can I have the user input a number like c++ cin >> number; and then just have my math functions do the rest. I have this so far...
public static void Main()
{
int x, y, result;
float floatresult;
int x = Console.ReadLine();
result = x + y;
Console.WriteLine("x + y : {0}", result);
}
The int x = Console.ReadLine() is red. Can anyone help me out???