Hi all,
I want to write a code that reads two numbers from two different text files (via a file open dialogue box), and perform addition on these two numbers - this operation should happen.
Then after that, I want a dialogue box to pop up and ask whether to perform another operation (say subtraction). If the answer is NO, the code should stop and write the result from the addition into a file.
If the answer is yes, then the code should subtract the two numbers, and write both the sum and the difference of the two numbers into a file.
Question: is this an example where a state machine is used? What would a simple prototype code look like? If I can get this, then I can apply the example to my much more complicated (not fundamentally more difficult) problem at hand.