First, you should understand the :math: tag in wapka.. math tag starts with :math: and ends on :/math: so your calculations should be between :math: and :/math: tags.. Outside of these tags math calculations will not work..
If you want that your answer should b e in decimal points, than you can start your math tag as :math,DEC: (You can change DEC with the number of decimal points you want in result for example: 2 or 3, even 5).. Now if we want 2 decimal then our code should look like this
Now instead of CALCULATIONS you can do following calculation or as you like.. :)
- Subtraction: You can subtract two numbers.. Like
For this purpose you can use - sign.
- Multiplication: You can multiply two or more digits to get the answer.. See example below
For this purpose you can use * sign.
- Addition: You ca add two or more numbers..
For this purpose you can use + sign.
- Division: You can divide two numbers, as I did in this example
For this purpose you can use / sign.
Mow, in above example you see that if we divide 4 bt 3 the answer will be in decimal, so the code should be used like this to also show the decimals..
Yiu can see that we have set answer decimal points to 2, you can set 3 or more as your likeness..
- Brackets: You can also use brackets ( and ) in your equations... For example.
In above example we have used brackets, so first it will calculate 2+4 and then will dividee it with the 2.. So What should be the answer??? Yes it should be in decimal points because we have set it to 2.. So the answer will be 3..
You can even do or in other words use all the operators in one go.. For example..
I hope that this tutorial will be helpful for you.. Please comment below if you liked this tutorial and join us on facebook to be in touch and get updates whenever new tutorial is added to wapkatutor's awesome tutorials list..
Join our facebook page
Create your own free wapsite in minutes
Request New Tutorials