| File | Date | Author | Commit |
|---|---|---|---|
| README.md | 2023-03-16 |
|
[32f3b1] Update README.md |
| main code | 2023-03-16 |
|
[720497] Main Code for simple calculator |
This code defines four functions - add(), subtract(), multiply(), and divide() - to perform the basic mathematical operations. The code then takes input values for the two numbers to be calculated, and the operator to use for the calculation, from an HTML form. When the form is submitted, the PHP code checks if both input values are numeric, and if so, performs the calculation using the selected operator. If either input value is not numeric, or if division by zero is attempted, an error message is displayed instead of the result.
To run this code, you'll need to save it to a file with a .php extension, and then open that file in a web browser on a server with PHP installed. When you enter the two numbers and select an operator, and click the "Calculate" button, the result of the calculation will be displayed.
This code is by https://www.thevapetown.com/
Thanks