Fibonacci Sequence

The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding numbers. The first two numbers in the sequence are 1 and 1, and the third number is 2. The fourth number is 3, the fifth number is 5, and so on. The function takes in a number n and prints out the first n numbers of the Fibonacci sequence .

Problem

Implement a function that takes in a number n and prints out the first n numbers of the Fibonacci sequence.
Example input:
n = 7
Example output:
1, 1, 2, 3, 5, 8, 13

Solution

This solution is in C#. Our A.I. can create solutions in multiple languages.
by kayakane
using System;

namespace InterviewPreperationGuide.Core.CrackingTheCodingInterview.c16q1 {
    public class Solution {
        public void Init () {
            Console.WriteLine ();
        }
    }
}

A.I. Evaluation of the Solution

The candidate's solution does not print out the first n numbers of the Fibonacci sequence as requested. The solution is incomplete and does not solve the problem. The candidate's approach is not clear.

Evaluated at: 2022-12-04 06:15:30