Mathematical Operators - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Mathematical Operators

Description:

Visual Basic provides the following mathematical functions: Abs (n) absolute value of n in radians. Atn(n) arc tangent of n in radians ... – PowerPoint PPT presentation

Number of Views:16
Avg rating:3.0/5.0
Slides: 8
Provided by: tmm26
Learn more at: http://www.sfstoledo.org
Category:

less

Transcript and Presenter's Notes

Title: Mathematical Operators


1
Mathematical Operators
  • Visual Basic

2
Mathematical Operators
  • Visual Basic provides you with the following
    mathematical operators
  • Addition
  • - Subtraction
  • Multiplication
  • / Division
  • \ Integer division
  • Mod Return the integer from division
  • Exponent
  • String concatenation

3
Mathematical Functions
  • Visual Basic provides the following mathematical
    functions
  • Abs (n) absolute value of n in radians
  • Atn(n) arc tangent of n in radians
  • Cos(n) cosine of n in radians
  • Exp(n) e raised to the power of n
  • Rnd(n) random number generator
  • Sgn(n) returns -1 if nlt0, 0 if n0, and 1 if n
    gt0

4
Mathematical Functions (Cont)
  • Sin(n) sine of n in radians
  • Sqr(n) square root of n
  • Str(n) converts numeric value of n into a
    string
  • Val(n) converts string (text) into a numeric
    value
  • Tan(n) tangent of n in radians

5
Operator Precedence
  • In a formula, how does the computer solve an
    equation?
  • Visual Basic uses operator precedence in the
    following order
  • () parenthesis
  • exponent
  • - negation
  • / multiplication and division
  • \ integer division
  • Mod return the remainder
  • - addition and subtraction

6
Operator Precedence (Cont)
  • In the following example
  • 532 14 (not 64)

7
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com