Advertisement
Guest User

Untitled

a guest
May 27th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.58 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace Interesting_stuff
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             int number;
  13.             Console.WriteLine("input a number: ");
  14.             number = int.Parse(Console.ReadLine());
  15.  
  16.             if ( ((number)&(1 << 0)) == 1)
  17.             {
  18.                 Console.WriteLine("True");
  19.             }
  20.             else
  21.             {
  22.                 Console.WriteLine("false");
  23.             }
  24.             Console.ReadLine();
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement