- The Following Algorithm Calculates The Nth Element Of A Sequence Method Seq N If N 1 Or N 2 Then Return 1 Else Ret 1 (88.12 KiB) Viewed 40 times
The following algorithm calculates the nth element of a sequence: Method seq(n) If n = 1 or n = 2 Then return 1 Else ret
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
The following algorithm calculates the nth element of a sequence: Method seq(n) If n = 1 or n = 2 Then return 1 Else ret
The following algorithm calculates the nth element of a sequence: Method seq(n) If n = 1 or n = 2 Then return 1 Else return seq(n-1) + seq(n-2) EndMethod What is seq(3)? Select one: O2