SHARE
TWEET

chetni

Sasho_Cvetkov17101 Jun 1st, 2020 563 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2. import java.util.Arrays;
  3.  
  4. public class chetni {
  5.     public static void main(String[] args){
  6.         Scanner scanner = new Scanner(System.in);
  7.  
  8.         int[] numbers = Arrays.stream(scanner.nextLine().split( "\\s+")).mapToInt(Integer::parseInt).toArray();
  9.  
  10.         for (int number : numbers) {
  11.             if (number % 2 == 0){
  12.                 System.out.print(number + " ");
  13.             }
  14.  
  15.         }
  16.     }
  17. }
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