Question: Write a program that asks the user to enter two integers, obtains the numbers from the user, then prints the larger number followed by the words “is larger.” If the numbers are equal, print the message “These numbers are equal.” Use only the single-selection form of the if statement you learned in this chapter.

Program output (equal)

Program output (larger)

Click here to see other solutions to Deitel C How To Program exercises.

Write A Comment