- Go into the "Multiply" sub-directory
- In your editor (e.g. Notepad++, Notepad, etc) open the file "Add.java"
- Go to "//PROGRAM STARTS HERE"
- Use the variables "n1", "n2", "result"
- Get a number from the end user and put the number in the "n1" variable -- see this example
- Get a number from the end user and put the number in the "n2" variable -- see this example
- Compute the product, e.g.
result = n1 * n2;
- Show the result -- see this example
- Don't forget the semi-colons ';' at the end of the lines
- Compile and Run
Also see
this related example
{
int n1, n2, result;
}