- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package com.crimsonrpg.professions;
- /**
- *
- * @author simplyianm
- */
- public class Blah {
- public static void main(String[] args) {
- int a = 0;
- int b = 1;
- int c = 0;
- int sum = 0;
- while (c < 4000000) {
- c = a + b;
- a = b;
- b = c;
- if (c % 2 == 0) {
- sum += c;
- }
- }
- System.out.println(sum);
- }
- }