my $x = new Rdw::BigInt "123456789";
my $y = new Rdw::BigInt "123056080";
print "$x - $y = ";
$x -= $y;
print "$x\n\n";
Ausgabe
123.456.789 - 123.056.080 = 400.709
Edit: Und jetzt auch als
my $x = new Rdw::BigInt "123456789";
my $y = new Rdw::BigInt "123056080";
my $z = $x + $y;
print "$x + $y = $z\n";
$z = $x - $y;
print "$x - $y = $z\n\n"
Ausgabe
123.456.789 + 123.056.080 = 246.512.869
123.456.789 - 123.056.080 = 400.709
Bis auf div und mod ists jetzt fertig.
Hmmm... ich hab neulich schonmal angefangen, handschriftliches Dividieren nachzuprogrammieren. Das brauch ich jetzt wohl. (Ich hoffe, das war nicht zu viel hint - sonst rauslöschen...)\n\n
<!--EDIT|Crian|1103660933-->
s--Pevna-;s.([a-z]).chr((ord($1)-84)%26+97).gee; s^([A-Z])^chr((ord($1)-52)%26+65)^gee;print;
use strict; use warnings; Link zu meiner Perlseite