Computers and Technology

Write a program that reads decimal numbers from the keyboard. The program reads at least three numbers. Find and display the smallest number, the second smallest number, and the third smallest number of the set. The program ends if the largest number encountered does not change for n iterations (the largest number does not change for the next n numbers since it changed). The value of n is read from the keyboard. Value n is greater or equal to 3. Please enter the value of n: 3
Please enter a demical number: 1.1
The set of the samllest number, the second smallest
number and the third smallest number is {1.100000, I,
/}
Please enter a demical number: 1.2
The set of the samllest number, the second smallest
number and the third smallest number is {1.100000,
1.200000, /}
Please enter a demical number: 4
The set of the samllest number, the second smallest
number and the third smallest number is {1.100000,
1.200000, 4.000000}
Please enter a demical number: 2.3
The set of the samllest number, the second smallest
number and the third smallest number is {1.100000,
1.200000, 2.300000}
Please enter a demical number: 0.4
The set of the samllest number, the second smallest
number and the third smallest number is {0.400000,
1.100000, 1.200000}
Please enter a demical number: 2.2
The set of the samllest number, the second smallest
number and the third smallest number is {0.400000,
1.100000, 1.200000} Program ended with exit code: 0
Please enter the value of n: 1
Please enter a demical number: 4
The set of the samllest number, the second smallest
number and the third smallest number is {4.000000, I,
/}
Please enter a demical number: 2
The set of the samllest number, the second smallest
number and the third smallest number is {2.000000,
4.000000, /}
Program ended with exit code: 0

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 19:00, devila321
When keyboarding, if you want to be fast and accurate you should return your hands on home row with your fingers relaxed and your eyes on the text use only your index fingers to hunt and peck keep your fingers stiff and your eyes on the keys slouch in your chair and keep your fingers hovering over all of the keys
Answers: 2
image
Computers and Technology, 24.06.2019 00:30, louie8656
Match the sentence fragment in the first column with the appropriate ending in the second column. a little per favore?
Answers: 1
image
Computers and Technology, 24.06.2019 17:40, lia1690
Which of the following processes applications across multiple computing devices? a. functional application b. distributed system c. workgroup information silo d. information silo
Answers: 3
image
Computers and Technology, 24.06.2019 21:00, Winzen07
Which device has the most limited computing functionality?
Answers: 1
Do you know the correct answer?
Write a program that reads decimal numbers from the keyboard. The program reads at least three numbe...

Questions in other subjects: