program dice implicit none integer i_answer, n, iseed real x, ran3 external ran3 iseed = 5 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 c if (i_answer.eq.0) stop('Good luck!') ! g77 does not support this. if (i_answer.eq.0) stop x = ran3(iseed) n = int(6*x)+1 write(*,*) 'ran3( ) give you',x ,' Dice shows', n goto 100 end