FORTRAN routine dice
subroutine dice(n)
ifirst=1
2 CALL HBOOK1(3,'Playing with two dice',11,2.,13.,0.)
do 3 j=1,n
ix1=6.*rndm(.01234)+1
ix2=6.*rndm(.56789)+1
3 CALL HFILL(3,FLOAT(IX1+IX2),0.,1.)
if (ifirst.eq.1) then
4 CALL HPLOT(3,'BK',' ',0)
ifirst=0
else
5 CALL HPLOT(3,'BU',' ',0)
endif
enddo
end
|