Fix this | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
27th Jun 2017, 6:44 AM
malti thakur
malti thakur - avatar
2 Answers
+ 10
// Just syntax errors usually committed by beginners. 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, 6:53 AM
Hatsy Rei
Hatsy Rei - avatar
+ 3
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, 6:56 AM
Sachin Artani
Sachin Artani - avatar