Advertisement
bacco

Boolean Variable

May 22nd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1. using System;
  2.  
  3. namespace BooleanVariable
  4. {
  5.     class MainClass
  6.     {
  7.         public static void Main(string[] args)
  8.         {
  9.             string input = Console.ReadLine().ToLower();
  10.  
  11.             bool output = Convert.ToBoolean(input);
  12.  
  13.             if (output == true)
  14.             {
  15.                 Console.WriteLine("Yes");
  16.             }
  17.             else
  18.             {
  19.                 Console.WriteLine("No");
  20.             }
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement