Answer to Question #262106 in C# for Loma

Question #262106

Write a C# Sharp program to accept two.1 integers from user and check whether they .are equal or not

1
Expert's answer
2021-11-06T18:56:10-0400
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();
        }
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS