#!/usr/bin/perl
randomize;

print "Number of Trials   : "; $t = <STDIN>, chomp($t);
print "Name of Output File: "; $f = <STDIN>, chomp($f);
$c = 0;

open(FILE,">$f");
print FILE "coffee.pl simulation of $t trials\n";

for($i = 1; $i <= $t; $i++) {
  $d = abs(rand() - rand());
  $c += $d;
  print FILE ("$i\t$d\n");
}

close(FILE);
