Factors of an integer
// 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"); } }
// 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"); } }