SHARE
TWEET

Untitled

a guest Jun 25th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.                    
  3. public class Program
  4. {
  5.     public static void Main()
  6.     {
  7.         double age = double.Parse(Console.ReadLine());
  8.  
  9.         char gender=char.Parse (Console.ReadLine());
  10.  
  11.        
  12.         if ( gender == 'm'){
  13.             if ( age < 16) {
  14.                  Console.WriteLine("Mr.");
  15.             } else {
  16.                 Console.WriteLine("Master");
  17.             }
  18.         } else if ( gender == 'f') {
  19.             if ( age < 16) {
  20.                  Console.WriteLine("Ms.");
  21.             } else {
  22.                 Console.WriteLine("Miss");
  23.             }  
  24.         }
  25.        
  26.        
  27.  
  28.     } // main bracket
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top