desislava777

problem1

Oct 30th, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 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 ConsoleApplication66
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var age = double.Parse(Console.ReadLine());
  14. var pol = Console.ReadLine().ToLower();
  15. if (age < 16)
  16. {
  17. if (pol == "m")
  18. {
  19. Console.WriteLine("Master");
  20. }
  21. else if (pol == "f")
  22. {
  23. Console.WriteLine("Miss");
  24. }
  25. }
  26. else if(age>=16)
  27. {
  28. if (pol == "m")
  29. {
  30. Console.WriteLine("Mr.");
  31. }
  32. else if (pol == "f")
  33. {
  34. Console.WriteLine("Ms.");
  35. }
  36. }
  37. }
  38. }
  39. }
Add Comment
Please, Sign In to add comment