Skip to content

Files

Latest commit

 

History

History
28 lines (23 loc) · 898 Bytes

README.md

File metadata and controls

28 lines (23 loc) · 898 Bytes

Java Fibonacci Generator

A simple Java program that generates the Fibonacci sequence up to a specified number of terms. The program includes error handling for invalid inputs and uses Scanner for user input.

Features

  • Generates Fibonacci sequence up to a user-defined number of terms.
  • Handles invalid input gracefully.
  • Console-based user interaction.

Usage

  1. Clone the repository:
    git clone https://github.com/nurulashraf/java-fibonacci-generator.git
  2. Navigate to the project directory:
    cd java-fibonacci-generator
  3. Compile and run the program:
    javac src/FibonacciGenerator.java
    java -cp src fibonaccigenerator.FibonacciGenerator
  4. Enter a positive integer when prompted to generate the Fibonacci sequence.

License

This project is licensed under the MIT License - see the LICENSE file for details.