Advertisement
Guest User

1. Ages

a guest
Sep 21st, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 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 ConsoleApp76
  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. if (age >= 3 && age <= 13)
  20. {
  21. Console.WriteLine("child");
  22. }
  23. if (age >= 14 && age <= 19)
  24. {
  25. Console.WriteLine("teenager");
  26. }
  27. if (age >= 20 && age <= 65)
  28. {
  29. Console.WriteLine("adult");
  30. }
  31. if (age >= 66)
  32. {
  33. Console.WriteLine("elder");
  34. }
  35. }
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement