Skip to content

A project that includes two LISP programs: one for factorials and the other for Fibonacci sequences. They use recursion, prompt user input, and display results efficiently.

Notifications You must be signed in to change notification settings

bl33h/fibonacciAndFactorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

fibonacciAndFactorial

The code includes two programs written in LISP: one calculates factorials and the other generates Fibonacci sequences. The factorial program uses recursion to compute the factorial of a given number, while the Fibonacci program recursively generates the Fibonacci sequence. Both programs prompt the user for input, perform the calculations, and display the results. They provide efficient solutions for factorial computation and Fibonacci sequence generation in LISP.


pic

FilesFeaturesHow To Use

Files

  • fact.lsp: file that implements the factorial solution.
  • fib.lsp: file that implements the fibonacci solution.

Features

The main features of the application include:

  • Factorial Calculation: The code implements a recursive function to calculate the factorial of a given number.
  • Fibonacci Sequence Generation: The code includes a recursive function to generate the Fibonacci sequence up to a given number.
  • User Input: The programs prompt the user to enter a number for which the factorial or Fibonacci sequence is to be computed.
  • Output Display: The code displays the computed factorial or Fibonacci sequence as the output.
  • Reusability: The factorial and Fibonacci functions can be reused in other LISP programs that require similar calculations.
  • Modular Design: The code follows a modular design with separate functions for factorial and Fibonacci calculations, promoting code organization and reusability.

How To Use

To clone and run this application, you'll need Git and a Lisp interpreter or compiler installed on your computer. From your command line:

# Clone this repository
$ git clone https://github.com/bl33h/fibonacciAndFactorial

# Open the folder
$ cd src

# Run de app
$ lisp
$ load "fact.lsp"
$ load "fib.lsp"

Note: to execute the code, it's important that run only on this location

About

A project that includes two LISP programs: one for factorials and the other for Fibonacci sequences. They use recursion, prompt user input, and display results efficiently.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published