xyproto / smileypyramid

:small_red_triangle: Example application for argument handling using docopt, for Rust and C++

Home Page:https://crates.io/crates/smileypyramid

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Smiley Pyramid

Output a pyramid of smiley faces.

$ ./smileypyramid 18
)
:)
:-)
:):)
:-):)
:-):-)
:-):):)
:):):):)
:-):-):-)
:-):):-):)
:-):):):):)
:):):):):):)
:-):-):):-):)
:):):):):):):)
:-):):-):):-):)
:):):):):):):):)
:-):):):):):):):)
:-):-):-):-):-):-)

Rust version

Build and run with cargo:

cargo run --release 18

C++ version

Installation

Build with cxx.

Linux

Install with:

install -Dm755 smileypyramid /usr/bin/smileypyramid

BSD or macOS

Build with cxx.

Install with:

install -d /usr/local/bin
install -m755 smileypyramid /usr/local/bin/smileypyramid

Requirements

If docopt is not installed in /usr/include and /usr/bin you might need to edit the Makefile.

General info

About

:small_red_triangle: Example application for argument handling using docopt, for Rust and C++

https://crates.io/crates/smileypyramid

License:GNU General Public License v3.0


Languages

Language:C++ 52.5%Language:Rust 47.5%