Feynman
09-10-2007, 08:57 AM
I write a program to beter see the comand goto;
It is a program read a number X , till X is less than 0 then it is invalid, so where is the problem in my code? where is the error?
code:
program GO TO
implicit none
10 print*,'entrer la valeur de X'
read* ,X
IF(X.LT. 0) then
print*,'INvalide'
GO TO 10
else
print*,'valide'
END IF
END
It is a program read a number X , till X is less than 0 then it is invalid, so where is the problem in my code? where is the error?
code:
program GO TO
implicit none
10 print*,'entrer la valeur de X'
read* ,X
IF(X.LT. 0) then
print*,'INvalide'
GO TO 10
else
print*,'valide'
END IF
END