Showing posts with label if statement. Show all posts
Showing posts with label if statement. Show all posts

if statement in C#


// If statement in C#

using System;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(3 < 4 ? "HI" : "BY");
        }
    }
}

If statement in C#


// If statement in C#

using System;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            if (3 < 2)
            {
                Console.WriteLine("HI");
            }
            else
            {
                Console.WriteLine("By");
            }
        }
    }
}