Skip to content

BorisLepage/LCD-Number-Converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LCD Number Converter

Go

This is a command-line program that converts a given number into an LCD-style representation. The program takes input for the number, width, and height from the user and generates the corresponding LCD-style representation.

This Project is from Coding Dojo.

Getting Started

To run the LCD Number Converter, follow these steps:

  1. Clone the repository:
git clone <repository_url> lcd-number-converter
  1. Navigate to the project directory:
cd lcd-number-converter
  1. Build the program:
go build
  1. Run the program:
./lcd-number-converter

Usage

The program will prompt you to enter the number, width, and height for the LCD-style representation. Follow the instructions on the command-line interface and provide the required input.

  • Number: Enter an integer between 1 and 9999.
  • Width: Enter an integer between 1 and 10.
  • Height: Enter an integer between 1 and 10.

After providing the input, the program will generate the LCD-style representation and display it on the console.

Example

Here's an example usage of the LCD Number Converter:

Enter a number (1-9999) : 1234
Enter the width (1-10) : 3
Enter the height (1-10) : 3
      ___  ___      
    |    |    ||   |
    |    |    ||   |
    | ___| ___||___|
    ||        |    |
    ||        |    |
    ||___  ___|    |

In this example, the input number is 1234, the width is set to 3, and the height is set to 3. The program generates the corresponding LCD-style representation and displays it on the console.

Notes

  • The program supports numbers between 1 and 9999, with a customizable width and height.
  • The LCD-style representations for each digit from 0 to 9 are predefined in the code.
  • The program validates the user input to ensure it falls within the specified range.

Contributing

Contributions to the LCD Number Converter project are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

Number to LCD kata

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages