in reply to PRNG/TRNG Cesaro's theorem
(probably use something like
taken from ARRAYS OF ARRAYSfor $i ( 1 .. 1000) { $AoA[$i] = [ somefunc($i) ]; }
foreach my @pair (@lori) { if( my_gcd_func(@pair) = 2) { $result++; }; }
if( $result = 6/(3.1415926 * 3.141596) ) { do whatever you need to do to meet assignment requirements }
The code shown here is not tested, and there are parts which are obviously missing, but those will become obvious as you work your way through the above sequence I think. Perldocs are your friend in this endeavor I think. The basic foreach loop and if statement covered in perldoc along with the other noted perl docs above should give you a place to start.
It seems to me that your main issue is that you're new to programming and sitting fine in your understanding of the theory. I have zero understanding of the theory which is probably reflected in the way I approached it above, but that is not really important to you right now. So I hope that the basic breakdown above gets you started in the direction that you want to go on the programming end. Best of luck to you on that assignment.
...the majority is always wrong, and always the last to know about it...
A solution is nothing more than a clearly stated problem...
|
---|