Flowgorithm: importing variables and modifying their values

2k Views Asked by At

My professor likes work to be turned in in Flowgorithm.

I can't figure out how to take the variable X=0 from the main method to the displayLoop method and then allow the displayLoop method to modify the stored value so it can be used as a countdown (or countup in this case).

1

There are 1 best solutions below

0
John On

Flowgorithm, like Java, uses pass-by-value for types like Integer, Real, etc...

To return one less, you can create a function and return the decremented value. So, maybe try something like this:

count = displayLoop(count)

The assignment sounds a tad strange. Is this a recursion assignment?