fork(2) download
  1. import java.util.Scanner;
  2.  
  3. public class Main{
  4. public static void main(String[] args) {
  5. int valor[] = new int[5];
  6. int i;
  7. Scanner in = new Scanner(System.in);
  8.  
  9. for (i = 0; i < valor.length; i++) {
  10.  
  11. valor[i] = in.nextInt();
  12.  
  13. if (valor[i] >= 100){
  14.  
  15. valor[i] = valor[i] = in.nextInt();
  16. }
  17. }
  18.  
  19. i = 0;
  20. while(i < valor.length &&valor[i] != 42){
  21. System.out.println(valor[i]);
  22. i++;
  23. }
  24. }
  25. }
Success #stdin #stdout 0.14s 321344KB
stdin
50
60
70
80
90
stdout
50
60
70
80
90