I'm having an issue with a loop where I have to input the temperature twice to start the loop. I think I know where the issue is, I just don't know how to fix it. I have been coding for a total of three weeks, so I am a total beginner at this.
Here's the part of the code I'm having issues with:
{
Console.WriteLine("Enter the temperature in Fahrenheit: ");
int fahrenheit = int.Parse(Console.ReadLine());
int celsius = FahrToCels(fahrenheit);
do
{
fahrenheit = int.Parse(Console.ReadLine());
celsius = FahrToCels(fahrenheit);
if (celsius < 73)
{
Console.WriteLine(celsius);
Console.WriteLine("It's too cold, raise the temperature.");
}
I think you can see what I mean. The only way I could get the loop to work at all was to repeat the int.Parse(Console.ReadLine(), but perhaps there is another fix that would fix this problem of having to input the temperature twice?
Really hoping someone can help me out with this.