can someone give an example php coding for this?

jayra

New member
You are required to create a simple program using PHP to achieve the followings:
Upon execution of your code, a menu should be displayed as follows:
1. Calculator
2. String Operations
3. Logical Operations
4. Quit
//You may either use a numbering system as above, or buttons where users can click on. Designs are left for you to decide.
When (1) is chosen:
1.1 Two digits
1.2 Three digits
1.3 Four digits
The above options are provided for users to decide the number of inputs. Now when the selection is done, the user is ready to key in the input. If (1.1) is chosen, then example input is 2, 3. When input is keyed in, user selects one of the available buttons to perform mathematical operation. Your calculator should support +, *, /, - and % (modulus) operators.
Your calculator should be able to handle floating point numbers as well.
String operations supported are:
1. Concatenation of any number of strings
2. Finding string length
3. Upper case to lower case conversion, and vice-versa
4. Determining the number of characters is a string. For example, if “hello” is keyed in, and letter “e” is selected, then your system must report 1.


Logical operations:
Same as calculator above, support operators such as <, >, == and !=.


please..help me.i would be really grateful. thank you
 
Back
Top