Skip to Content
Absolute Beginner's Guide to Programming, Third Edition
book

Absolute Beginner's Guide to Programming, Third Edition

by Greg Perry
November 2002
Beginner content levelBeginner
432 pages
11h 44m
English
Que
Content preview from Absolute Beginner's Guide to Programming, Third Edition

Expressions and Math Operators

You should learn Visual Basic's math operators so that you can calculate and assign expression results to variables when you code assignment statements that contain expressions. An operator is a symbol or word that does math and data manipulation.

Table 7.4 describes Visual Basic's primary math operators. Other operators exist, but those in Table 7.4 suffice for most of the programs you'll write. Look over the operators. You are already familiar with most of them because they look and act like their real-world counterparts.

Table 7.4. Primary Math Operators
Operator Example Description
+ Net + Disc Adds two values
- Price - 4.25 Subtracts one value from another
* Total * Factor Multiplies two values
/ Tax / Adjust ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Absolute Beginner's Guide to Programming, Second Edition

Absolute Beginner's Guide to Programming, Second Edition

Greg Perry

Publisher Resources

ISBN: 0789729059Purchase book