write a program to input 10 numbers and display greatest and smallest among them in Java.
please tell with explanation
Answers
Answered by
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
Physics,
4 months ago
Social Sciences,
4 months ago
Math,
4 months ago
Art,
8 months ago
India Languages,
1 year ago
Psychology,
1 year ago