Advertisement
Kwintendr

Untitled

Jan 15th, 2013
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. public class aantaldageninfebruari {
  2.  
  3.     /**
  4.      * @param args
  5.      */
  6.     public static void main(String[] args) {
  7.         // TODO Auto-generated method stub
  8.  
  9.         int teller = 0;
  10.  
  11.         for (int j = 0; j < 2013; j++) {
  12.             Boolean z = (j % 100 == 0) ? ((j % 400 == 0) ? (true) : (false))
  13.                     : ((j % 4 == 0) ? (true) : (false));
  14.             if (z == true) {
  15.                 teller = teller + 1;
  16.             }
  17.         }
  18.         System.out.println(teller);
  19.     }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement