โ† Cognizant questions

Custom Fibonacci series code

Filed under Cognizant

Write a program to generate a sequence of N terms where the first two terms are 2 and 5, and each subsequent term is the sum of the preceding two terms.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Cognizant questions

Collected from public candidate posts and coding forums. Updated Nov 2026.