C# C# Basics (Retired) Perform if / else

c#

Print "C# Rocks!" if language equals "C#" otherwise print language + " is not C#." So if I entered "Cheese" then "Cheese is not C#." would be printed to the screen.

I CANNOT SUBMIT THE ANSWER.. THEY SAY THERE IS A COMMUNICATION PROBLEM

CodeChallenge.cs
string language = Console.ReadLine();

if(language == "C#")
{
  System.Console.WriteLine("C# Rocks!");
}
else
{
    System.Console.WriteLine(language + " is not c#.");
}

1 Answer

Steven Parker
Steven Parker
177,538 Points

It was probably some temporary server issue.

It worked for me just now. Try it again.