# File: Example_english_version.php

File: Example_english_version.php Example script text/plain Example File (ENGLISH) Calculator Perform basic mathematical operations By Serkan Ceylani . 17 years ago 1,880 bytes

## Contents

 ``` result ); print "
"; // 1-2-3-4-0.5 = -8.50 \$substract = new Substract(new Numbers(array(1,2,3,4,0.5))); print ( \$substract->result ); print "
"; // 1*2*3*4*0.5*0.8 = 9.60 \$multiply = new Multiply(new Numbers(array(1,2,3,4,0.5,0.8))); print ( \$multiply->result ); print "
"; // 1/2 / 3/4 = 0.04 \$divide = new Divide(new Numbers(array(1,2,3,4))); print ( \$divide->result ); print "
"; // 8 % 3 = 2 \$modul = new Modul(new Numbers(array(8,3))); print ( \$modul->result ); print "
"; // Factorial: // No recursion inside the function,"Multiply" object and "range ()" function. // It just works :) \$faktoryel = new Multiply(new Numbers(range(1,5))); print ( \$faktoryel->result ); print "
"; //Factorial of 7... \$faktoryel = new Multiply(new Numbers(range(1,7))); print ( \$faktoryel->result ); print "
"; // 4 ^ 0.5 = 2 \$power = new Power(new Numbers(array(4,0.5))); print ( \$power->result ); print "
"; \$circle = new Circle(2.5); echo "Circle's chamfer = ".\$circle->Chamfer(); print "
"; echo "Circle's area = ".\$circle->Area(); print "
"; echo "PieArea = ".\$circle->PieArea (180); print "
"; echo "Arc length = ".\$circle->ArcLength(180); \$triangle = new Triangle(); \$triangle->setSides(6,8,10); print "
"; echo "Angle1 = ".\$triangle->findAngle1()." Angle2 = ".\$triangle->findAngle2()." Angle3 = ".\$triangle->findAngle3(); print "
"; echo "Area of Triangle :".\$triangle->Area(); ?> ```
For more information send a message to `info at phpclasses dot org`.