[SOLVED] program cpp

21.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (1 vote)

1. Write a program that allows the user to enter two integers and then tells the user which of the two values is smaller. For example, if the user entered the integers 5 and 6 the output should be something like:- 5 is the smaller number. As always test the program with several different sets of input values to make sure that it runs properly. 2. What happens if the user enters two numbers that are the same? 3. If necessary x the program so that it gives a `reasonable’ output if the user enter two numbers that are the same. 4. If you used only simple if statements in your program, rewrite it to use if-else constructs. If you already used if-else constructs, rewrite your program to use only if statements. 5. You should turn in two programs and output showing the test cases for both programs. The two programs are the program that uses if’s and the program that uses if-else’s.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.