Instruction: We will write a program that prompts the user to enter 10 integers, reports the smallest value among these 10 integers, and then displays the 10 integers and their difference from the smallest value. Please name your source code as lab7.cpp.
Your program works as follows. Note that you are not required to design and implement functions in this lab, you can write all the codes in the main():
An example run of your program is as follows, where the user inputs are underlined, and the program output are shown in regular format:
$ ./a.out Please enter 10 integers:32 30 12 3 100 29 1 42 80 90 The smallest value is 1. All values and their difference from smallest values are: 32 31 30 29 12 11 3 2 100 99 29 28 1 0 42 41 80 79 90 89
Coding Style Requirement:
How to submit
Please submit your program (which has to be named lab7.cpp) to the following webpage: