Skip to content

juanma-brl/rocket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

The Rocket

The exercise consist drawing a rocket in the command line. The executable is called rocket and acepts as parameter the amount of lines to draw the rocket, without counting the spike (|) and feet (three 'x' at the bottom).

Here is some examples:

%> rocket -l 5 

    |
    X
   XXX
  XXXXX
 XXXXXXX
XXXXXXXXX
X   X   X

%> rocket -l 20

                   |
                   X
                  XXX
                 XXXXX
                XXXXXXX
               XXXXXXXXX
              XXXXXXXXXXX
             XXXXXXXXXXXXX
            XXXXXXXXXXXXXXX
           XXXXXXXXXXXXXXXXX
          XXXXXXXXXXXXXXXXXXX
         XXXXXXXXXXXXXXXXXXXXX
        XXXXXXXXXXXXXXXXXXXXXXX
       XXXXXXXXXXXXXXXXXXXXXXXXX
      XXXXXXXXXXXXXXXXXXXXXXXXXXX
     XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
X                  X                  X

Additionally, the program accepts an inversion flag. If set, the rocket is drawn upside down:

%> rocket -l 5 -i

X   X   X
XXXXXXXXX
 XXXXXXX
  XXXXX
   XXX
    X
    |

Rules

  1. Use cmake a build tool. The executable has to build by just calling:
cmake <path to CMakeLists.txt> && make 

you can use the template of this repository as starting point.

  1. Use Git as scm tool.

  2. You can use C++ standard up to c++17.

  3. You can use all third party libraries you need, as long as the executable builds as described in Point 1.

  4. Please document all assumptions you made.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published