Fibonacci series up to n terms

PHOTO EMBED

Sun Oct 12 2025 17:06:35 GMT+0000 (Coordinated Universal Time)

Saved by @final

using System;
class Program {
    static void Main() {
        Console.Write("Enter terms: ");
        int n = int.Parse(Console.ReadLine());
        int a=0, b=1, c;
        for(int i = 0; i < n; i++) {
            Console.Write(a + " ");
            c = a + b;
            a = b;
            b = c;
        }
    }
}
content_copyCOPY