Guest User

Untitled

a guest
Dec 23rd, 2019
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5. static void Main()
  6. {
  7. int age = int.Parse(Console.ReadLine());
  8. string gender = Console.ReadLine();
  9.  
  10. if (age>=16)
  11. {
  12. if (gender=="f")
  13. {
  14. Console.WriteLine("Ms.");
  15. }
  16. else
  17. {
  18. Console.WriteLine("Miss");
  19. }
  20. }
  21. else
  22. {
  23. if (gender=="m")
  24. {
  25. Console.WriteLine("Mr.");
  26. }
  27. else
  28. {
  29. Console.WriteLine("Master");
  30. }
  31. }
  32.  
  33.  
  34. }
  35. }
Add Comment
Please, Sign In to add comment