title: FORTRAN problem
body: <p>need help in Fortran...</p>
  
  <p>This is the main loop of the program..</p>
  
  <pre><code>do iStep=0,nStep
      write(7,*)iStep
  
      !* Compute new temperature using FTCS scheme.
      do i=1,N
          if( istep==0) then  !only for t=0
              tt_new(i)=250
      write(7,*)tt_new(i)
          else
              if(i==1) then
                  tt_new(i)=2*coeff*(tt(i+1)+35.494)-0.036*tt(i)
                  write(7,*)tt(i)
              else 
                  if(i==N) then
                      tt_new(i)=2*coeff*(tt(i-1)+35.494)-0.036*tt(i)
                      write(7,*)tt(i)
                  else           
                      tt_new(i) = coeff*(tt(i+1) + tt(i-1)+33.333)+(1 - 2*coeff)*tt(i)
                      write (7,*) tt_new(i)
                  end if
              end if
          end if     
      end do
  
      do i=1,N
          tt(i) = tt_new(i)     ! Reset temperature to new values
      enddo
  end do
  </code></pre>
  
  <p>this is the output....</p>
  
  <pre><code>0
  2.5000000E+02
  2.5000000E+02
  2.5000000E+02
  2.5000000E+02
  2.5000000E+02
  2.5000000E+02
  2.5000000E+02
  2.5000000E+02
  2.5000000E+02
  2.5000000E+02
  2.5000000E+02
  2.5000000E+02
  2.5000000E+02
  2.5000000E+02
  2.5000000E+02
  2.5000000E+02
  2.5000000E+02
  2.5000000E+02
  2.5000000E+02
  2.5000000E+02
  1
  2.5000000E+02     &lt;--
  2.6666650E+02
  2.6666650E+02
  2.6666650E+02
  2.6666650E+02
  2.6666650E+02
  2.6666650E+02
  2.6666650E+02
  2.6666650E+02
  2.6666650E+02
  2.6666650E+02
  2.6666650E+02
  2.6666650E+02
  2.6666650E+02
  2.6666650E+02
  2.6666650E+02
  2.6666650E+02
  2.6666650E+02
  2.6666650E+02
  2.5000000E+02   &lt;--
  </code></pre>
  
  <p>As you can see...the programm doesn't calculate the values for the first and last node...Can you tell me why???</p>