IBM Interview Question

Write the code logic for fibonacci program.