Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace demo
- {
- class Program
- {
- static void Main(string[] args)
- {
- int age = int.Parse(Console.ReadLine());
- string output = string.Empty;
- if (0 >= age || age <= 2)
- {
- output = "baby";
- }
- else if (3 >= age || age <= 13)
- {
- output = "child";
- }
- else if (14 >= age || age <= 19)
- {
- output = "teenager";
- }
- else if (20 >= age || age <= 65)
- {
- output = "adult";
- }
- else if (age >= 66)
- {
- output = "elder";
- }
- Console.WriteLine(output);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment