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