Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace PersonalTitles
- {
- class Program
- {
- static void Main(string[] args)
- {
- double age = double.Parse(Console.ReadLine());
- string gender = Console.ReadLine();
- if (gender == "m")
- {
- if (age >= 16)
- {
- Console.WriteLine("Mr.");
- }
- else
- {
- Console.WriteLine("Master");
- }
- }
- if (gender == "f")
- {
- if (age >= 16)
- {
- Console.WriteLine("Ms.");
- }
- else
- {
- Console.WriteLine("Miss");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement