A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
15
Task/Loops-Do-while/Fortran/loops-do-while-2.f
Normal file
15
Task/Loops-Do-while/Fortran/loops-do-while-2.f
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
PROGRAM DOWHILE
|
||||
C Initialize modulus and value.
|
||||
INTEGER MODLUS, IVALUE
|
||||
PARAMETER (MODLUS = 6)
|
||||
IVALUE = 0
|
||||
|
||||
C FORTRAN 77 has no do-while structure -- not semantically. It is not
|
||||
C difficult to simulate it using GOTO, however:
|
||||
10 CONTINUE
|
||||
IVALUE = IVALUE + 1
|
||||
WRITE (*,*) IVALUE
|
||||
IF (.NOT. (MOD(IVALUE, MODLUS) .EQ. 0)) GOTO 10
|
||||
|
||||
STOP
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue