Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross 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
Oct 30, 2012
1
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
 
Replies continue below

Recommended for you

Schoolwork is not allowed.

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

Part and Inventory Search

Sponsor

Top