Sunday, January 22, 2012

Arithmetic expression:

An expression that represents a numeric value is called an Arithmetic Expression.  So, an arithmetic expression is one which is evaluated by performing a sequence of arithmetic operations to obtain a numeric value, which replaces the expression.
Examples:
                3.14159
                K
                (A+B)*(C+D)
                -1.0/X + Y/Z**2
                2.0 * 3.14159*RADIUS
Restrictions:
                Two operators cannot be written consecutively.
Example:
                A*-B is illegal because (*) and (-) are two different operators. The second factor must be made into an expression by using
parentheses, viz: A*(-B).

No comments:

Post a Comment