Ask Question

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

+5
Answers (1)
  1. 25 February, 23:17
    0
    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");

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write a program that assigns two integer values from standard input to the variables int1 and int2, then prints "true" if they are equal, ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers