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)
- {
- Random rand = new Random();
- int[] niz = new int[100];
- int[] niz1 = new int[100];
- for (int i = 0; i < 100; i++)
- {
- niz[i] = rand.nextInt(500);
- if (niz[i] % 2 == 0)
- {
- niz1[i] = niz[i];
- }
- }
- for (int i = 0; i < 100; i++)
- {
- System.out.println(niz[i]);
- System.out.println(niz1[i]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement