How can I allow user input into my calculator?

by EpiCoderNao   Last Updated August 14, 2019 04:26 AM

I'm trying to make a text based calculator as a console app. I can't figure out how to let the user choose an operation, along with 2 numbers.

Console.WriteLine("Please choose an operation; *, +, -, or /.");

````````````if (a = "+")
``````````````` Console.WriteLine("Addition Chosen");
``````````````` Console.WriteLine("Choose First Number");


I expected that if I put if (a = "+") that it would go and run my code. Instead I received the error message: "Cannot implicitly convert type string to type bool".
Tags : c#

Related Questions