Computer Science, asked by shashwatprathmesh8, 8 months ago

write a program to input 10 numbers and display greatest and smallest among them in Java.

please tell with explanation​

Answers

Answered by Pablu
2

Answer:

I am a Python coder. Sorry! But you can get some hints from below.

Explanation:

numbers = []

say = int(input("Enter number of elements : "))

for i in range(0, say):

   ele = int(input())

   numbers.append(ele)    

print(numbers)

print(" The Greatest number is : ", max(numbers))

print(" The Smallest number is : ", min(numbers))

Similar questions