SHARE
TWEET

Untitled

a guest Jul 17th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2. public class Arreglo {
  3.     public static void main(String[] args) {
  4.         Scanner teclado = new Scanner (System.in);
  5.  
  6.         int[] arr = new int [7];
  7.         int i;
  8.  
  9.         for (i = 0 ; i < arr.length ; i ++){
  10.         System.out.printf(" Ingrese numero [%d]: ", i);
  11.         arr[i] = teclado.nextInt();
  12.         }
  13.  
  14.         for (i = 0 ; i < arr.length ; i ++){
  15.             if (arr[i] % 2 == 0){
  16.                 System.out.printf(" Los numeros pares son [% d] ", i);
  17.             }
  18.         }
  19.     }
  20.  
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top