VelizarAvramov

05. Boolean Variable

Nov 15th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.44 KB | None | 0 0
  1. using System;
  2. using System.Numerics;
  3.  
  4. namespace Demo
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             string input = Console.ReadLine();
  11.  
  12.             bool result = Convert.ToBoolean(input);
  13.             if (result)
  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