Page not loading? Try clicking here.
Placeholder

#591

Function 3 - Self Assessment 6 1s - MB

Problems

There is a sequence where the first number is 1, and the N-th number is composed of the sum of the N/2-th number and the (N-1)-th number. Receive a natural number N not greater than 50 as input, and write a program that uses recursion to print the N-th number in this sequence.

(1 2 3 5 7 10 13 18 …)


Example

8
18

Source

자기주도C언어프로그래밍

You must sign in to write code.