androidmelt
Programmer
Hi Guys,
Just needed a bit of help writing a program that gives a number between 0 and 1.
I have so far written:
===============================
Program Main
Implicit None
Integer :: i, count, j=1
write(*,*) "how many times do you want to generate?"
read(*,*) count
call random_seed(1)
Do i=1,count
call random_number(j)
Write(*,*) "the random number is" j
End Do
End Program Main
===============================
So far the program keeps giving me huge numbers (positive and negative)
I only want numbers between 0 and 1. Any ideas please?
Many thanks
==========================
Just needed a bit of help writing a program that gives a number between 0 and 1.
I have so far written:
===============================
Program Main
Implicit None
Integer :: i, count, j=1
write(*,*) "how many times do you want to generate?"
read(*,*) count
call random_seed(1)
Do i=1,count
call random_number(j)
Write(*,*) "the random number is" j
End Do
End Program Main
===============================
So far the program keeps giving me huge numbers (positive and negative)
I only want numbers between 0 and 1. Any ideas please?
Many thanks
==========================