Advertisement
soxa

IsFemaleBool

Nov 5th, 2013
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 KB | None | 0 0
  1. using System;
  2.  
  3. class IsFemaleBool
  4. {
  5.     static void Main()
  6.     {
  7.         bool isFemale = false;
  8.         int choise;
  9.         while (true)
  10.         {
  11.             Console.WriteLine("Choise your gender\n For : \n Feamle submit - 1\n Male submit - 2");
  12.             choise = int.Parse(Console.ReadLine());
  13.  
  14.             if (choise == 1 || choise == 2)
  15.             {
  16.                 break;
  17.             }
  18.         }
  19.  
  20.         if (choise == 1)
  21.         {
  22.             isFemale = true;
  23.         }
  24.  
  25.         Console.WriteLine("Female => {0}",isFemale);
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement