Hide
Easily highlight source code for your blog with our Syntax Highlighter. Join Siafoo Now or Learn More

Fibonacci problem - Fortran

Revision 2 vs. Revision 3

Legend:

Unmodified
Added
Removed
  • Title

    r2 r3  
    1 Fibonacci problem 
     1Fibonacci problem - Fortran 
  • Code

    r2 r3  
    1011 
    1112n(0) = 1 
    1213n(1) = 1 
    1314 
    1415sum=0 
     16print*, 'Number=', n(0), ' SUM=', sum 
     17print*, 'Number=', n(1), ' SUM=', sum 
    1518 
    1619do i=2,2000 
    1720 
    1821n(i) = n(i-1) + n(i-2) 
    1922