<html> <head> <title>Basic Maths Operations </title> </head> <body> <h3>Addition, Subtraction, Multiplication and Division</h3> <p> 5 + 2 = <%=5+2 %> <br> 5 - 2 = <%=5-2 %> <br> 5 * 2 = <%=5*2 %> <br> 5 / 2 = <%=5/2 %> <br> 5 % 2 = <%=5%2 %> <p> </body> </html>
Description:
- Type + between two values or variables and use the expression tag to print the result to the Web page.The + operator performs addition.
- Type - between two values or variables and use the expression tag to print the result to the Web page.The + operator performs subtraction.
- Type * between two values or variables and use the expression tag to print the result to the Web page.The * operator performs multiplication.
- Type / between two values or variables and use the expression tag to print the result to the Web page.The / operator performs division.
- Type % between two values or variables and use the expression tag to print the result to the Web page.The % operator returns the remainder when integer arithmetic is performed.
**********************************OUTPUT**********************************
Addition, Subtraction, Multiplication and Division
5 + 2 = 7
5 - 2 = 3
5 * 2 = 10
5 / 2 = 2
5 % 2 = 1
****************************************************************************5 - 2 = 3
5 * 2 = 10
5 / 2 = 2
5 % 2 = 1
No comments:
Post a Comment