anizko

01. Ages

May 19th, 2019
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.84 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _1.Ages
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int Age = int.Parse(Console.ReadLine());
  14.  
  15.             if(Age>=0 && Age <=2)
  16.             {
  17.                 Console.WriteLine("baby");
  18.             }
  19.             else if (Age >2 && Age <= 13)
  20.             {
  21.                 Console.WriteLine("child");
  22.             }
  23.             else if (Age > 13 && Age <= 19)
  24.             {
  25.                 Console.WriteLine("teenager");
  26.             }
  27.             else if (Age > 19 && Age <= 65)
  28.             {
  29.                 Console.WriteLine("adult");
  30.             }
  31.             else
  32.             {
  33.                 Console.WriteLine("elder");
  34.             }
  35.  
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment