#!/usr/bin/perl -w use strict; my $nr1 = int ( rand(100) ); my $nr2 = int (rand (100-$nr1)); my $nr3 = 100-($nr1+$nr2); print "$nr1 + $nr2 + $nr3 = " . ($nr1+$nr2+$nr3) ."\n";