Changes between Version 2 and Version 3 of ControlSystems/SoftwareTeam/Training/GettingStarted/Variables


Ignore:
Timestamp:
Nov 4, 2019, 2:59:12 PM (6 years ago)
Author:
David Albert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/Training/GettingStarted/Variables

    v2 v3  
    2727}
    2828}}}
    29 6. Save the file as !VariablesExample.java (File->Save)
     296. Save the file as !VariablesExample.java (File->Save) [[Image(JavaVariables.jpg,50%,margin=10,align=right)]]
    30307. Run the program
    31318. In the output terminal window, observe that the number 12 is output.
    3232
     33Our 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
    3335=== Extra Credit ===
    3436Change the program, adding more variables, changing numbers and formulas and run it again.