string convChoice = "";
string endProgram = "Y";
string userTemp = "";
int parsedTemp = 0;
float convertedTemp = 0;
int roundedTemp = 0;
while ((endProgram == "y") || (endProgram == "Y"))
{
Console.WriteLine("If you would like to convert to Celcius please enter C. To convert to Farenheit please enter F.");
convChoice = Console.ReadLine(); //sets their choice of conversion type
if ((convChoice == "c") || (convChoice == "C"))
Console.WriteLine("Please enter your original Farenheit value:");
userTemp = Console.ReadLine(); //gets the user value
parsedTemp = int.Parse(userTemp); //converts uservalue to an int for calculation
convertedTemp = (5 / 9) * (parsedTemp - 32);
//roundedTemp = Convert.ToInt32(convertedTemp);
Console.WriteLine("The Celcius equivalent of Farenheit {0} is {1}.", userTemp, convertedTemp);
}
else if ((convChoice == "f") || (convChoice == "F"))
Console.WriteLine("Please enter your original Celcius value:");
convertedTemp = (9 / 5) * (parsedTemp + 32);
roundedTemp = Convert.ToInt32(convertedTemp);
Console.WriteLine("The Farenheit equivalent of Celcius {0} is {1}.", userTemp, roundedTemp);
else
Console.WriteLine("Invalid Choice");
Console.WriteLine("Would you like to try again? Y/N");
endProgram = Console.ReadLine();