Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please write a C program to solve this question 2. Write a program that reads decimal numbers from the keyboard. Find and display the smallest
Please write a C program to solve this question
2. Write a program that reads decimal numbers from the keyboard. 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. 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: 0Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started