Answer:
Step-by-step explanation:
The following code is written in Pyton and keeps prompting the user for new decimal values, once the user is done it loops through the array getting the highest three values and outputting them to the user.
def atleast_three():
numbers = []
smallest = 0
medium = 0
largest = 0
while True:
numbers.append(float(input("Please enter a decimal value: ")))
answer = input("Add another value? Y/N").lower()
if answer != 'y':
break
else:
continue
for x in numbers:
if x > largest:
largest = x
elif (x > medium) & (x < largest):
medium = x
elif (x > smallest) & (x < medium):
smallest = x
print(str(smallest) + ", " + str(medium) + ", " + str(largest))