Logo 
Search:

Visual Studio Forum

Ask Question   UnAnswered
Home » Forum » Visual Studio       RSS Feeds

A problem with FORTRAN syntax

  Asked By: Akbar    Date: Nov 12    Category: Visual Studio    Views: 1492
  

Hi everybody, I wrote this program in a FORTRAN IDE and I got this error : Error: An ENDDO statement occurred without a corresponding DO, DO WHILE, or DO TIMES statement.

and this is the code :

program kazem
implicit real *8(a-h,o-z)

integer:: i,j

!delta_x = 0.1 ( game makani) & delta_t = 0.001
!x = (i-1)delta_x

dimension A(11,101)

do j=1,101

A(1,j) = 0
A(11,j) = 0

end do

do i=1,11

if(((i-1)/10) >= 0 .and. ((i-1)/10) <= 0.5)then
A(i,1)=2*(i-1)/10
elseif(((i-1)/10) >= 0.5 .and. ((i-1)/10) <= 1)then
A(i,1)=2*((i-1)/10-1)

end do

do i=2,10

do j=2,101
A(i,j+1)=0.1*A(i+1,j)+0.8*A(i,j)+0.1*A(i-1,j)

enddo

do i=1,11

do j=1,101
print A(i,j)

end do

end program kazem

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on A problem with FORTRAN syntax Or get search suggestion and latest updates.




Tagged: