program dice_gfortran implicit none integer i_answer, n real x 100 write(*,*) 'Row a dice ? (1=Yes ; 0=No)' read(*,*) i_answer if ((i_answer.ne.0) .and. (i_answer.ne.1)) then write(*,*) '1 or 0 only, please.' goto 100 endif if (i_answer.eq.0) stop('Good luck!') ! g77 does not support this. c if (i_answer.eq.0) stop call random_number (x) n = int(6*x)+1 write(*,*) 'call random_number(x) give you x=',x , &' Dice shows', n goto 100 end