#!/usr/bin/perl -w use strict; use diagnostics; $|++; my $total = 20; my @members = map int rand 10, (1 .. $total); my @pointers = (" ") x $total; my ($teacher, $pupil); print "@members\n"; for (1 .. 50) { do { $teacher = int rand $total; $pupil = int rand $total; } while $teacher == $pupil; $pointers[ $pupil ] = "V"; $pointers[ $teacher ] = "."; $members[ $pupil ] = ($members[$teacher] * $members[$pupil]) % 10; print "@pointers\n@members\n"; $pointers[ $pupil ] = " "; $pointers[ $teacher ] = " "; }
In reply to Re: An Introduction to General Systems Thinking
by perlmoth
in thread An Introduction to General Systems Thinking
by PhilHibbs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |