Expression and Operator Expression is a programming language statements that has a value. Usually an expression consists of an operator and each operands. Operator performs mathematical or logical operations on value QBASIC supports following types of operators. Types of Operators:- a) Arithmetic operator b) Relational Operators c) Logical Operators d) String Operators a) Arithmatic Operators:- Arithmetic operator are used for various mathematical calculation . Arithmetic operators performed such as addition, subtraction, multiplication, division and exponentiation. A numeric expression is any collection of operators and operands. a) The following are the arithmetic operator used in QBASIC:-- Operators Operations Example ^ Exponential A^B - Negation -B * Multiplication A*B / Floating point division A/B \ integer division A\B MOD Modular Division A MOD B + Addition A+B - Subtraction A-B Example Code:- Example Output:- b) Relational O...
Comments
Post a Comment