Please help me with the task: "Asking questions"

Hello, I’m working on this task:

Write a program that asks the user how they are doing by using the phrase “How are you?” If the user answers “fine”, respond with “Life is great!” Otherwise, try to cheer them up - respond with “Everything’s gonna be alright.”

Here is my code:


namespace ConsoleInput
{
   public class MoodChecker
   {
       public static void Main(string[] args)
       {
           Console.WriteLine("How are you?");
           string answer = Console.ReadLine();
           if (answer == "fine")
           {
           Console.WriteLine("Life is great!");
           }
           else
           {
           Console.WriteLine("Everything's gonna be alright.");
           }
       }
   }
}

Can anyone please help me to solve it?

Do you have using System; at the top of the file?

Hi!, yes it is on top

Oh, then the solution is correct. Congratulations! :tada: