Blog literacki, portal erotyczny - seks i humor nie z tej ziemi
#! /usr/bin/perl -w
print "Podaj liczbe, ktorej cyfry chcesz zsumowac: ";
$n =
chomp ($n);
print "\n";
$n = abs ($n);
do
{
$reszta = $n % 10;
$suma = $reszta + $suma;
$n = ($n - $reszta) / 10;
}
while ($n != 0);
print "Suma cyfr tej liczby to $suma";
$x =