I'm just starting to learn learn C# and have started learning If Else statements. I could have sworn this programming worked but then after an update (I may be blaming something here that has nothing to do with it) to Visual Studio the if's and else's turned pink, they no longer worked, and it told me the "int numTemp = int.Parse(temperature);" line wasn't the correct format.
Hopefully someone can help me figure out what went wrong. There are no else's because I went back to the beginning of the lesson to start over and try to figure it out, but to no prevail.
using System;
namespace Retry
{
class MainClass
{
public static void Main(string[] args)
{
Console.WriteLine("What's the tempurature like?");
string temperature = Console.ReadLine();
int numTemp = int.Parse(temperature);
if (numTemp < 20)
{
Console.WriteLine("Argh!");
}
if (numTemp == 20)
{
Console.WriteLine("Ugh");
}
if (numTemp > 20)
{
Console.WriteLine("AAAHHH!!!");
}
Console.Read();
}
}
}
Thank you in advance