Variants of calculating the n-th term of the Fibonacci series
Three variants of calculating the n-th term of the Fibonacci series.
Input:
n - number of the sequence member
a1, a2 - the first 2 members of the sequence
Also are EIGHT sometimes slightly, sometimes more different variations of calculating Nth number of Fibonacci sequence.
V1 - functions and tests, with usual summary in loop
V2 - pseudo OOP, also with usual summary in loop
V3 - functions, with counting number of the member a2 in sequence and just adding the number of sequence member as steps
V4 - short version of above
Honestly, there are only two versions that are slightly different.