What am I doing wrong? [Nested if statements]
I've typed the code exactly as it told me to in the code playground for that particular lesson, which is as follows: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { int age = 18; if (age > 14) { if(age > 18) { Console.WriteLine("Adult"); } else { Console.WriteLine("Teenager"); } } else { if (age > 0) { Console.WriteLine("Child"); } else { Console.WriteLine("Something's wrong"); } } } } } That's the lesson from the code. I've typed it exactly as so and it still gives me several errors, I've even tried it in Visual Studio and I'm stumped. Here is an example of my code. This lesson is confusing me to hell and back. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { int age = 18; if (age > 14) { if (age > 18) { Console.WriteLine("Adult"); } else { Console.WriteLine("Teenager"); } } else { if (age = 0) { Console.WriteLine("Child"); } } else { Console.WriteLine("Something's wrong"); } } } } } It gave me the following error: ..\Playground\(34, 1): error CS1022: Type or namespace definition, or end-of-file expected