|
What does the program print to the monitor? A good answer might be:The variable contains: 123 |
Assignment Statement SyntaxThis program printed out the same thing as the first example program. However, this program did not initialize the variable and so had to put a value into it later. The syntax of assignment statements is easy. Assignment statements look like this: variableName = expression;
An assignment statement asks for the computer to perform two steps, in order:
For example, the assignment statement: asks for two actions:sum = 32 + 8 ;
|
QUESTION 11:What does the following assignment statement statement do: Click Here after you have answered the questionsum = 42 - 12 ; |