Output a pyramid of smiley faces.
$ ./smileypyramid 18
)
:)
:-)
:):)
:-):)
:-):-)
:-):):)
:):):):)
:-):-):-)
:-):):-):)
:-):):):):)
:):):):):):)
:-):-):):-):)
:):):):):):):)
:-):):-):):-):)
:):):):):):):):)
:-):):):):):):):)
:-):-):-):-):-):-)
This is also an example application for argument handling using docopt
, for both Rust and C++.
Build and run with cargo
:
cargo run --release 18
Build with cxx
.
Install with:
install -Dm755 smileypyramid /usr/bin/smileypyramid
Build with cxx
.
Install with:
install -d /usr/local/bin
install -m755 smileypyramid /usr/local/bin/smileypyramid
- docopt
- Project page: docopt.cpp
- Arch Linux package:
docopt
- AUR package:
docopt.cpp-git
- Debian package:
libdocopt-dev
If docopt
is not installed in /usr/include
and /usr/bin
you might need to edit the Makefile
.
- Version: 1.0.3
- License: GPL2
- Author: Alexander F. Rødseth <xyproto@archlinux.org>