Q.No 22 Solution

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;


namespace ConsoleApplication6
{
    
    class Program
    {
        static void Main(string[] args)
        {
            int num = 121456890;
            
            if (((num / 100) % 10) == 1 || ((num / 100) % 10) == 0)
            {
                Console.WriteLine("Third digit is 0 or 1");
            }else
                Console.WriteLine("Third digit is neither 0 nor 1");

        }   
    }
}

 

Add a Comment

Your email address will not be published. Required fields are marked *