Please enable JavaScript.
Coggle requires JavaScript to display documents.
BASIC PROGRAM ELEMENTS / BASIC C++ PROGRAM
( APPLY OPERATORS AND…
-
- Constant refers to fixed values that cannot be changed by the program
- It is a good programming practice to give constant name is CAPITAL LETTER to differentiate between Variable Name and Constant Name
use some information like our name, our address or our phone number, as a example for printing purpose
-
-
-
- Simply generate the remainder that when you divide 2 integers
- The modulus operator can only used for integers and will generate a compiler error if you attempt to apply it to floating values
- Only the divide operator need special attention.
- When divide two integer number, you may get a floating-point answer
- Warning of possible losing of data
- All operator within parentheses are performed first ()
- Parentheses within parentheses ( ( ) )
Inner parentheses will be performed first, from inside out
- The *, /, % are performed first, from left to right
- The +, - are performed last, from left to right