Login   Register  
PHP Classes
elePHPant
Icontem

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: 2008-07-17 15:10
Size: 361 bytes
 

Contents

Class file image Download
<?php
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>";
?>