Write a C# Sharp program to accept two.1 integers from user and check whether they .are equal or not
using System;
using System.Collections.Generic;
namespace App
{
class Program
{
static void Main(string[] args)
{
Console.Write("Enter integer 1: ");
int number1 = int.Parse(Console.ReadLine());
Console.Write("Enter integer 2: ");
int number2 = int.Parse(Console.ReadLine());
if (number1 == number2)
{
Console.WriteLine("Two integers are equal.");
}
else {
Console.WriteLine("Two integers are NOT equal.");
}
Console.ReadLine();
}
}
}
Comments
Leave a comment