Factors of an integer

From Rosetta Code
Revision as of 15:59, 31 March 2017 by rosettacode>Tejamodukuru (Replaced content with " // to find the factors of given number <?hh namespace { echo("Enter the number:"); fscanf(STDIN,"%d\n",$n); for($i=0;$i<=n;i++) { if($n%i==0) { echo("The factors of gi...")

// to find the factors of given number <?hh namespace { echo("Enter the number:"); fscanf(STDIN,"%d\n",$n);

for($i=0;$i<=n;i++) { if($n%i==0) { echo("The factors of given number is $i\n"); } }