PROJECT EULER IN THE HEADERS OF FOR LOOPS ( JAVA )

PROBLEM 1 :

> Find the sum of the multiples of 2 and 5 below 1000

for ( String i = "1" , c = "0" , m = "" ;

m. equals ( "" ) ;

c = ( Integer . parseInt ( i ) % 3 == 0 || Integer . parseInt ( i ) % 5 == 0 ) ?

( new Integer ( Integer . parseInt ( i ) + Integer . parseInt ( c ) ) ) . toString ( ) : c,

i = ( new Integer ( Integer . parseInt ( i ) + 1 ) . toString ( ) ) ,

m = ( Integer . parseInt ( i ) < 1000 ) ? "" : c,

System . out . print ( m )

) ;

PROBLEM 2 :

> Find the sum of all even Fibonacci numbers below 4000000

for ( String i = "1" , c = "0" , p = ( new Double ( ( 1 + Math . sqrt ( 5 ) ) / 2 ) ) . toString ( ) , f, m = "" ;

m. equals ( "" ) ;

f = ( new Long ( Math . round ( ( Math . pow ( Double . parseDouble ( p ) , Integer . parseInt ( i ) ) ) / Math . sqrt ( 5 ) ) ) ) . toString ( ) ,

c = ( Integer . parseInt ( f ) % 2 == 0 ) ?

( new Integer ( Integer . parseInt ( f ) + Integer . parseInt ( c ) ) ) . toString ( ) : c,

i = ( new Integer ( Integer . parseInt ( i ) + 1 ) . toString ( ) ) ,

m = ( Integer . parseInt ( f ) < 4000000 ) ? "" : c,

System . out . print ( m )