Skip to main content

2.5) Math Operations


You will soon want to be doing calculations in your programming. You need to know the symbols for the basic mathematical operations.  They are defined in Fortran as =, +, -, *, and /, where + and - are add and subtract , * is multiplication and / is division.   Also, note that ** is exponentiation (e.g. 2**3 equals 8). The = symbol is different compared to math.  In programming it means assign the value on the right hand side to the variable on the left hand side. This is discussed more in the next section.