An open API service indexing awesome lists of open source software.

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.

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.