n=0
20 n=n+1
write(*,*) 'endless loop',n
goto 20
end
|
n=0
20 continue
n=n+1
write(*,*) 'endless loop',n
goto 20
end
|
n=0
20 continue
if(n.eq.10) goto 100
n=n+1
write(*,*) 'endless loop',n
goto 20
100 continue
end
|
write(*,*) 'input integer'
read(*,*) k
judge=mod(k,2)
c
if(judge.eq.0) then
write(*,*) 'you input even number'
end if
c
if(judge.eq.1) then
write(*,*) 'you input odd number'
end if
c
end
|
write(*,*) 'input integer'
read(*,*) k
judge=mod(k,2)
c
if(judge.eq.0) then
write(*,*) 'you input even number'
else
write(*,*) 'you input odd number'
end if
c
end
|
|