Skip to content

TechieAS/Fibonacci-series-using-C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Fibonacci Program

This program calculates the Fibonacci sequence using recursion.

Description

  • The program defines a recursive function fibonacci(int n) to compute the nth Fibonacci number.
  • The main() function initializes n to 5 and prints the corresponding Fibonacci number.
  • The program uses standard C libraries (stdio.h) for input and output.

Usage

  1. Compile the program using a C compiler:
  2. Run the program:
  3. The output will display:

Notes

  • The current implementation is recursive, which may not be efficient for large values of n.
  • Consider using an iterative approach or memoization for optimization.

Author

Created by Amrendra singh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages