Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Write a program to print the first 10 numbers in the Fibonacci sequence.

Easy

Problem Statement

Write a program to print the first 10 numbers in the Fibonacci sequence.

Sample Input

None

Sample Output

0 1 1 2 3 5 8 13 21 34

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
function fibonacci(n: number): void { // Your logic here } // Call the function
Log in or sign up to run or submit your code.Log inSign up
Input
None
Expected Output
0 1 1 2 3 5 8 13 21 34