fork(1) download
  1. import java.util.Scanner;
  2.  
  3. class MenorValorSequencia {
  4. public static void main(String args[]) {
  5. Scanner sc = new Scanner(System.in);
  6. int[] variavel = new int[10];
  7. for (int i = 0; i <= 9; i++) {
  8. variavel[i] = sc.nextInt();
  9. }
  10. int menorValor = Integer.MAX_VALUE;
  11. for (int i = 0; i <= 9; i++) {
  12. if (variavel[i] < menorValor) {
  13. menorValor = variavel[i];
  14. }
  15. }
  16. System.out.println(menorValor);
  17. }
  18. }
Success #stdin #stdout 0.15s 321280KB
stdin
-10
0
4
2
23
-78
8
6
1
-1
stdout
-78