Friday, August 25, 2017

1866 Bill URI Problem Only Solution In C#

using System; 
 class Exercise8 

    static void Main()
   
    {
       
    int a=Convert.ToInt32(Console.ReadLine());
   
    for(int b=1; b<=a; b++)
   
    {
        int c=Convert.ToInt32(Console.ReadLine());
       
        if(c%2==0)
            Console.WriteLine("0");
        else
            Console.WriteLine("1");
    }
   
    }

}

No comments:

Post a Comment