- #1
ƒ(x) → ∞
- 25
- 0
I have been busy trying to generate, using FORTRAN's random number generator, random x and y co-ordinates which follow a simple pattern such as x2-100x, but for some reason the FORTRAN compiler prints nothing.
Anybody want to help me with this problem?
Anybody want to help me with this problem?
Code:
program quadraticdistribution
implicit none
integer i
integer x,y
real l
integer seed/-23434567/
c ************************************
c intialize the random number
l=rand(seed)
c intialize the x and y values
x=0
y=0
30 do i=1,200
x=int(100*rand(0))
y=int(100*rand(0))
if (x.ge.(y*y-100*y)) goto 30
Write(*,*) x,y
enddo
stop
end