Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Fibo
- {
- public static void main( String args[] )
- {
- long a=0, b=1;
- System.out.println( a + "\n" + b );
- for( int i=1 ; i<46 ; i++ ){
- if( i%2!=0 ) System.out.println( a+=b );
- else System.out.println( b+=a );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement