https://github.com/patilyashh/fibonacci-number
Day 10 of 75 Days C programing challenge || #10 ||
https://github.com/patilyashh/fibonacci-number
Last synced: about 1 month ago
JSON representation
Day 10 of 75 Days C programing challenge || #10 ||
- Host: GitHub
- URL: https://github.com/patilyashh/fibonacci-number
- Owner: PATILYASHH
- Created: 2024-02-20T16:49:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-20T16:53:10.000Z (over 2 years ago)
- Last Synced: 2025-03-02T16:22:28.270Z (over 1 year ago)
- Language: C
- Size: 79.1 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fibonacci Series Generator
This program generates the Fibonacci series up to a specified number of terms.
## Usage
1. Compile the program using a C compiler (e.g., GCC).
2. Run the compiled executable.
3. Enter the number of terms for the Fibonacci series when prompted.
## How it works
- The program prompts the user to enter the number of terms for the Fibonacci series.
- It then calculates and prints the Fibonacci series up to the specified number of terms.
## Code Description
The program consists of two functions:
- `fibonacci(int n)`: This function generates the Fibonacci series up to `n` terms.
- `main()`: This function prompts the user to enter the number of terms and calls the `fibonacci()` function.
## Example
Enter the number of terms: 7
Fibonacci series up to 7 terms: 0 1 1 2 3 5 8
## Note
- The program may produce unexpected results for large values of `n` due to integer overflow.