#!/usr/bin/perl use warnings; my ( $number ) = read_user_number(); my ( $factors ) = factor( $number ); output_number( $factors );
Yes, I've added a complication ... though we generate an array of factors, I return and pass a reference to the array, rather than the list of values.
As Occam said: Entia non sunt multiplicanda praeter necessitatem.
In reply to Re: First code - Factors
by TomDLux
in thread First code - Factors
by mabeuf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |