Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package projekat;
- import java.util.Random;
- /**
- *
- * @author student
- */
- public class Projekat {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- int [] niz = new int[100];
- int [] parnNiz = new int[100];
- Random random= new Random();
- for(int i=0; i< niz.length; i++)
- {
- niz[i] =random.nextInt(500);
- if(niz[i] %2 ==0)
- {
- parniNiz[i] = niz[i];
- }
- System.out.println(parniNiz[i]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement