write a program in java to input 10 numbers and print the smallest number
Answers
Answered by
8
Answer:
import java.util.*;
public class Program
{
public static void main(String[] args) {
ArrayList<Integer> numbers= new ArrayList<>();
Scanner in = new Scanner(System.in);
for(int i=0;i<=9;i++){
numbers.add(in.nextInt());
}
System.out.println(Collections.min(numbers));
}
}
Explanation:
Bro first stop learning java and concentrate mainly on python script .
it will help u in future
Hope it helps u
Similar questions
Math,
6 months ago
Physics,
6 months ago
English,
1 year ago
Psychology,
1 year ago
Economy,
1 year ago