Changes between Version 2 and Version 3 of ControlSystems/SoftwareTeam/Training/GettingStarted/Variables
- Timestamp:
- Nov 4, 2019, 2:59:12 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ControlSystems/SoftwareTeam/Training/GettingStarted/Variables
v2 v3 27 27 } 28 28 }}} 29 6. Save the file as !VariablesExample.java (File->Save) 29 6. Save the file as !VariablesExample.java (File->Save) [[Image(JavaVariables.jpg,50%,margin=10,align=right)]] 30 30 7. Run the program 31 31 8. In the output terminal window, observe that the number 12 is output. 32 32 33 Our example program creates 3 variables (boxes) named a, b, c. They are all integer variables (they can only hold integer numbers). The program then places the number 3 in variable a, the number 4 in variable b, and the product of whatever is in a and b into variable c. Finally, the program prints whatever value is in variable c. 34 33 35 === Extra Credit === 34 36 Change the program, adding more variables, changing numbers and formulas and run it again.