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

Raymond Yam
PRO
Raymond Yam
Pro Student 345 Points

if / else

I forgot to post the code. Please help me if someone can. Thank you.

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

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

1 Answer

Juthawong Naisanguansee
Juthawong Naisanguansee
Full Stack JavaScript Techdegree Graduate 79,756 Points

Hello Raymond ,

You forget the space between language variable and is.

Thanks

string language = Console.ReadLine();

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