Facebook
From Adrian Pietrzak, 5 Years ago, written in Java.
Embed
Download Paste or View Raw
Hits: 234
  1. package com.company;
  2.  
  3. import java.util.Random;
  4.  
  5. public class Main {
  6.  
  7.     public static void main(String[] args) {
  8.  
  9.         boolean[] tab = new boolean[40];
  10.  
  11.         for (int i = 0; i<40; i++) {
  12.             if (i%2==0) {
  13.                 tab[i] = false;
  14.             } else {
  15.                 tab[i] = true;
  16.             }
  17.         }
  18.  
  19.         for (int i = 0; i<40; i++) {
  20.                 System.out.println(i + ": " + tab[i]);
  21.         }
  22.  
  23.     }
  24. }
  25.