118k views
0 votes
Write a program that assigns two integer values from standard input to the variables int1 and int2, then prints "true" if they are equal, and "false" if they are not. submit

1 Answer

1 vote
C# program code:

int int1;
int int2;
Console.WriteLine("Insert first number");
int1 = Console.ReadLine();
Console.WriteLine("Insert second number");
int2 = Console.ReadLine();
if (int1 == int2)
{
Console.WriteLine("true");
}
else
{
Console.WriteLine("false");
}
User Fabricemarcelin
by
7.9k points

No related questions found