source: liacs/ccs/op2/pareto.pl@ 305

Last change on this file since 305 was 2, checked in by Rick van der Zwet, 15 years ago

Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)

  • Property svn:executable set to *
File size: 472 bytes
RevLine 
[2]1#!/usr/bin/env perl
2#
3# Small script to calculate the box area and volume
4
5foreach (1 .. 300) {
6 $w = $_;
7 foreach ( 1 .. 300) {
8 $l = $_;
9
10 $h = 2 / 3 * $l;
11 $v = $w * $l * $h;
12 $a = 2 * ($w * $h + $w * $l + $l * $h);
13
14 if ( $v >= 60 and $v < 300 ) {
15 $f = sqrt((400 - $v) ** 2 + $a ** 2);
16 $v = int($v);
17 $a = int($a);
18 $f = int($f);
19 print "$f $a $v\n";
20 }
21 }
22}
23
Note: See TracBrowser for help on using the repository browser.