Find all factors of a natural number | Set 1 | function to print the divisors ; Driver program to test above function
function printDivisors ( n ) { for ( i = 1 ; i <= n ; i ++ ) if ( n % i == 0 ) document . write ( i + " " ) ; } document . write ( " " + " " ) ; printDivisors ( 100 ) ;