Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting Random values

Status
Not open for further replies.

davk

Agricultural
Joined
Oct 30, 2012
Messages
1
Location
DK
Hi there,

I am involving a program in which i have to select a value through a range of values, but i do not know precisely how to use random function in FORTRAN.

For example, I show you a small part of my data below. So, I need to divide each line into 4 part and pick just one "1" of each part.

211110122122
121011111110
121112111211
211121111111
100122221121
121101211211
121121111112
111200112111
112111110111
111211111112

In each part that i have three "1", I have to be able to select one of those randomly.

Help me please to solve this problem, coz i have been spending many days to solve that but i couldn't.

Thanks in advance
Davood
 
Schoolwork is not allowed.

TTFN
faq731-376
7ofakss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top