https://github.com/wesfly/fibonacci-rust
This program generates the fibonacci sequence using rust.
https://github.com/wesfly/fibonacci-rust
fibonacci fibonacci-sequence rust rust-lang
Last synced: over 1 year ago
JSON representation
This program generates the fibonacci sequence using rust.
- Host: GitHub
- URL: https://github.com/wesfly/fibonacci-rust
- Owner: wesfly
- Created: 2025-01-30T17:02:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-31T17:17:16.000Z (over 1 year ago)
- Last Synced: 2025-01-31T18:26:45.464Z (over 1 year ago)
- Topics: fibonacci, fibonacci-sequence, rust, rust-lang
- Language: Rust
- Homepage:
- Size: 1.96 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fibonacci Rust Program
This repository contains a Rust program that generates the Fibonacci sequence. The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding ones, usually starting with 0 and 1.
## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
## Installation
To run this program, you need to have Rust installed on your machine. You can install Rust by following the instructions on the [official Rust website](https://www.rust-lang.org/learn/get-started).
Clone the repository to your local machine using the following command:
```bash
git clone https://github.com/wesfly/fibonacci-rust.git
cd fibonacci-rust
```
## Usage
To generate the Fibonacci sequence, run the following command:
```bash
cargo run
```
This will compile and run the program, generating the Fibonacci sequence.
### Example Output
```
Fibonacci Sequence:
Iteration 1: 0
Iteration 2: 1
Iteration 3: 1
Iteration 4: 2
Iteration 5: 3
Iteration 6: 5
Iteration 7: 8
Iteration 8: 13
Iteration 9: 21
...
```
You can modify ```max_iterations``` to change the number of terms generated in the sequence by editing the source code.