This simple program askes for 2 numbers from the user
and computes the difference (subtraction) of those numbers.
It then askes for 2 more numbers from the user
and computes the product (multiplication) of those numbers.
It illustrates these new concepts:
declaring variables and storing information into them
writing expressions to retrieve stored data and manipulate
it algebraically
simple keyboard input (prompt)
simple screen output (alert)
defining a named function in the head part
executing a named function by clicking a button
user input from the keyboard with "prompt"
Input
User will supply 2 numbers, one at a time when prompted.
User will then supply 2 more numbers, one at a time when prompted.
Integers or reals (decimal numbers) are ok to use.
Output
The program will print to the screen the
difference of the first pair of numbers.
The program will print to the screen the product of
the second pair of numbers.
Termination
The program will end automatically after doing the product computation
(after the second pair).