Skip to content

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

License

Notifications You must be signed in to change notification settings

nurulashraf/java-fibonacci-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages