Advertisement
KodingKid

C# Age and Naming system with age grouping features

May 3rd, 2021
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.48 KB | None | 0 0
  1. first_name = Console.ReadLine();
  2. second_name = Console.ReadLine();
  3. age = Console.ReadLine();
  4. Console.WriteLine("Please enter your first, and second name - and also your age.");
  5. Console.WriteLine("You are called:");
  6. Console.WriteLine(first_name);
  7. Console.WriteLine(second_name);
  8. Console.WriteLine("And you are...");
  9. if (13 > age)
  10.     Console.WriteLine("You are a kid.");
  11. if (20 > age)
  12.     Console.WriteLine("You are a teen.");
  13. if (22 < age)
  14.     Console.WriteLine("You are an adult.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement