Question 8 : Fibonacci Series


27 October 2020 - Slot 1

Display sequence of Fibonacci series until the number given by user and count total even number and odd numbers in that series expect zero.Fibonacci series should start with 1.

Total count of even numbers should be displayed in the first row and odd numbers should be displayed in next row

Number given by user for Fibonacci series should be greater than 5 and less than or equal to 20, Otherwise display "INVALID INPUT"

If number given by user is space, character or empty display "INVALID INPUT" The text message should be displayed in exact format as it is case sensitive.

Test Case 1

Input :
7

Output :
1 1 2 3 5 8 13
2
5


Explanation

In above example 2 is for count of even numbers that is (2,8) and 4 is count of odd number thats (1,1,3,5,13).