|Ratings|| ||Unique User Downloads|| ||Download Rankings|
|Not yet rated by the users||Total: 98 ||All time: 9,775 This week: 156|
This class perform calculations with values passed as strings.
It takes as parameters a string with number values separated by commas.
The class can parse the string to extract the values and performs several types of arithmetic operations like addition, subtraction, multiplication, division and average.
$add = '10,20,-30,40,50,60';
$mul = '2,2,5,10';
$sub = '20,10';
$div = '1000,20,5,2';
$avg = '10,20,30,40,50,60';
$addition = Arithmetic::Calculate($add, 'addition');
$multiplication = Arithmetic::Calculate($mul, 'multiplication');
$substraction = Arithmetic::Calculate($sub, 'substraction');
$divisin = Arithmetic::Calculate($div, 'division');
$average = Arithmetic::Calculate($avg, 'average');
echo 'Addition: '.$addition;
echo 'multiplication: '.$multiplication;
echo 'Substraction: '.$substraction;
echo 'divisin: '.$divisin;
echo 'average: '.$average;
PHP Arithmetic class
This class can perform arithmetic operations such as addition , division etc
It can perform.
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.