This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
ch04-getting-stuff-done-i [2017/08/30 22:27] mithat [Arithmetic operators] |
ch04-getting-stuff-done-i [2017/08/30 22:28] mithat [Mixing numeric types] |
||
---|---|---|---|
Line 103: | Line 103: | ||
==== Integer division ==== | ==== Integer division ==== | ||
- | When both operands in a %%/%% operation are integer types, the result will be an integer type and truncating division will take place. In truncating division, the fractional part of the result (i.e., the stuff after the decimal point) will be thrown away. The result will not be rounded to the nearest integer value; whatever the fractional part happens to be will simply be eliminated. | + | When both operands in a ''%%/%%'' operation are integer types, the result will be an integer type and truncating division will take place. In truncating division, the fractional part of the result (i.e., the stuff after the decimal point) will be thrown away. The result will not be rounded to the nearest integer value; whatever the fractional part happens to be will simply be eliminated. |
<code> | <code> | ||
Line 132: | Line 132: | ||
Assignment is one way that the state of a program can be changed. | Assignment is one way that the state of a program can be changed. | ||
+ | |||
+ | ------------------------------------- | ||
==== Mixing numeric types ==== | ==== Mixing numeric types ==== |