RosettaCodeData/Task/Loops-Break/Fortran/loops-break-1.f

18 lines
254 B
FortranFixed
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
program Example
implicit none
real :: r
integer :: a, b
do
call random_number(r)
a = int(r * 20)
write(*,*) a
if (a == 10) exit
call random_number(r)
b = int(r * 20)
write(*,*) b
end do
end program Example