Aliendreamer

personal titles softuni simple conditions

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