A PHP Error was encountered

Severity: 8192

Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Filename: libraries/Filtered_db.php

Line Number: 23

Write a C# Sharp program to accept two integers and check whether they are equal or no
Q:

Write a C# Sharp program to accept two integers and check whether they are equal or no

0

Write a C# Sharp program to accept two integers and check whether they are equal or no

Sample Output:

Check whether two integers are equal or not:                                                               
-------------------------------------------    
Input 1st number: 20                                                                                          
Input 2nd number: 20                                                                                          
20 and 20 are equal.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

using System;  
public class Exercise1  
{  
    public static void Main()  
    {  
        int int1,int2;
         Console.Write("\n\n");
         Console.Write("Check whether two integers are equal or not:\n");
         Console.Write("-------------------------------------------");
         Console.Write("\n\n");
        Console.Write("Input 1st number: ");  
        int1= Convert.ToInt32(Console.ReadLine());  

        Console.Write("Input 2nd number: ");  
        int2= Convert.ToInt32(Console.ReadLine());  

    if (int1 == int2)
        Console.WriteLine("{0} and {1} are equal.\n",int1,int2);
    else
        Console.WriteLine("{0} and {1} are not equal.\n",int1,int2);
   }  
} 

 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now