Skip to content

goodness-cpu/quadchecker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

quad-checker

A command-line tool written in Go that checks whether an ASCII figure is a valid quadrilateral — and if so, tells you exactly what kind.

What it does

You pass an ASCII shape through the command line, and quad-checker analyzes it and tells you what kind of quadrilateral it is — or tells you it isn't one at all.

Possible results include:

  • Square
  • Rectangle
  • Rhombus
  • Parallelogram
  • Trapezoid
  • Invalid — if the figure doesn't form a valid quadrilateral

Usage

go run . "<your ASCII figure>"

Examples

go run . "+---------+
|         |
|         |
+---------+"
# Output: Rectangle

go run . "+----+
|    |
|    |
+----+"
# Output: Square

How it works

The program reads the ASCII figure passed as a command-line argument, parses its structure, and applies geometric logic to classify the shape based on its dimensions and proportions.

No external libraries are used — just Go's standard library.

Getting started

Prerequisites: Go 1.18 or later

Or build a binary:

go build -o quad-checker
./quad-checker "<figure>"

Built with

  • Go — standard library only

Author

Goodness Omotine@goodness-cpu


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages