Advertisement
Guest User

Problem v elsa

a guest
Jun 25th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 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 ConsoleApplication2
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12.  
  13. {
  14. double age = double.Parse(Console.ReadLine());
  15.  
  16. char gender=char.Parse (Console.ReadLine());
  17. if (age < 16)
  18. {
  19. if (gender == 'f')
  20. {
  21. Console.WriteLine("Ms");
  22. }
  23. else
  24. {
  25. Console.WriteLine("Miss");
  26. }
  27. }
  28.  
  29. else if (gender == 'm')
  30. {
  31. if (age > 16)
  32. {
  33. Console.WriteLine("Mr.");
  34. }
  35. else
  36. {
  37. Console.WriteLine("Master");
  38. }
  39. }
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50. }
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement