27th Jun 2017, 9:30 AM
malti thakur
malti thakur - avatar
2 ответов
+ 1
You are missing 2 closing braces ( } ) at the very end of your program. Try indenting your if/else statements, by pressing tab or doing 4 spaces, as they currently line up with your Main() method, reducing readability.
27th Jun 2017, 9:37 AM
Cohen Creber
Cohen Creber - avatar
0
// you missed curly brackets 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) { // program to find your age group int age=20; int YourAge; YourAge=Convert.ToInt32(Console.ReadLine()); Console.WriteLine("your are of{0}",YourAge); if (YourAge >= age ) Console.WriteLine("You are an ADULT"); else if (YourAge<age && YourAge>12) Console.WriteLine ("You are a teen"); else Console.WriteLine("You are A KID"); } } }
27th Jun 2017, 10:53 AM
2_3rr0r5
2_3rr0r5 - avatar