Login   Register  
PHP Classes

File: factoringExample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Matthew Johnston  >  Composite Factoring  >  factoringExample.php  >  Download  
File: factoringExample.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Composite Factoring
Decompose number in prime number factors
Author: By
Last change: added comments
Date: 6 years ago
Size: 361 bytes


Class file image Download
require_once 'Factoring.php'//include the class

$factoring = new Factoring();

$factored $factoring->factor_number(10); //factor the number

echo $factored "<br/>"//print the returned value of the factor_number function
echo "<pre>";
print_r($factoring->get_factored_array()); //print the array of the factored number
echo "</pre>";