Question: Write a program Smallest that reads three integers from the user and determines the smallest value. In this case, you are asking the user to
Write a program Smallest that reads three integers from the user and determines the smallest value.
In this case, you are asking the user to enter numbers, then tell them which one is the smallest. I am writing 6 test cases at the bottom.
It means you are running your code 6 times. The first time, your first number is 3, second number is 2, and the third number is 1. Your code should say, your smallest number is 1.
The second time when you run your code, your first number should be 1, the second is 2 and third is 3. The output should be 1.
in any test case, if you don't see the output 1, it means your code has some error. This program should work for any set of data.
Test Cases:
3 2 1
1 2 3
2 1 3
3 1 2
1 3 2
2 3 1
Note:
Once your code is running, try number -12, 12 and 0 as an input to check the output.
Submit only one OUTPUT.
ASSUME, NO TWO NUMBERS ARE SAME.
No need to turn in 6 outputs. For submission, one output is enough.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
