Made in PHP »

I am posting code snippet of a simple calculator which performs basic functions like add, subtract, divide, multiply of two numbers and also square, square root and cube of a number. No database is used for creating this calculator. A class named calc is defined in this which has the above said methods and when they are called the calculation is done according to them. It is really helpful for learning purpose. This code snippet teaches us how to create a class and methods and also how to call them.
Posted by abhicyco (#8) 981 days ago (http://myphpscriptz.com)
Discuss  | Bury | Tweet This | Tagged: calculator
Add To 

Who Voted for this Story

Comments

No one has commented on this article yet.

Log in to comment or register here.