How to Program Calculations? An introduction To Arithmetic Expressions
What are arithmetic expressions?
Arithmetic Expressions are expressions used to solve problems such as calculating an employee's salary or programming an accounting software used to manage the day-to-day financial flow of a business.
A simple arithmetic expression could be the sum of two numbers e.g. 3+4, or can be used in an equation to calculate an employee's salary e.g. net salary = 50000-1000.
In order to tell a computer how to process data when writing programs, operators are used in arithmetic expressions.
Understanding the use of arithmetic expressions is crucial as they are used in the majority of computer programs.
The following table contains operators used to perform arithmetic operations, and their order of precedence:
Pretorius, CM and Erasmus HG. (2012) Basic Programming Principles. 2. Cape Town: Juanita Pratt. |
Pretorius, CM and Erasmus HG. (2012) Basic Programming Principles. 2. Cape Town: Juanita Pratt. |
Comments
Post a Comment