Module 5
Computers can perform mathematical calculations much faster than human beings.
However, the computer itself will not be able to perform any mathematical calculations
without receiving instructions from the programmer. In VB2010, we can write code to
instruct the computer to perform mathematical calculations such as addition, subtraction,
multiplication, division and other kinds of arithmetic operations. In order for VB2010 to
carry out arithmetic calculations, we need to write code that involves the use of various
arithmetic operators. The VB2010 arithmetic operators are very similar to the normal
arithmetic operators, only with slight variations. The plus and minus operators are the
same while the multiplication operator use the * symbol and the division operator use the /
symbol. The list of VB2010 arithmetic operators are shown in table 5.1 below:
Summary
In this chapter, you learned how to use various mathematical operators in Visual
Basic 2010 in writing code for mathematical calculations. You also learned how to
create some programs to solve mathematical problems like Pythagoras Theorem.
Besides, you learned how to create the BMI calculator.
Comments
Post a Comment