GithubHelp home page GithubHelp logo

avisuri / fizz-buzz Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bast/fizz-buzz

0.0 1.0 0.0 10 KB

Exercise to practice building projects with CMake.

License: Other

Fortran 53.83% C 10.41% C++ 35.76%

fizz-buzz's Introduction

License

fizz-buzz

Exercise to practice building projects with CMake.

Background

Inspired by a Project Euler exercise and based on the popular game and popular programming job interview question where you have to say/print "Fizz" if a natural number is divisible by 3 and "Buzz" if it is divisible by 5:

1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
Fizz Buzz
...

We wish to build a code which computes the "Fizz-buzz sum" for a given natural number N, summing all natural numbers <= N which are multiples of 3 or 5. For N=10 the sum is 3+5+6+9+10 = 33.

The source code and unit tests are there:

.
|-- LICENSE.md
|-- README.md
|-- src
|   |-- divisible.f90
|   |-- fizz_buzz.f90
|   |-- fizz_buzz.h
|   `-- main.cpp
`-- test
    |-- fizz_buzz.cpp
    `-- main.cpp

Tasks

  • Build a shared library.
  • Build and link the main program.
  • Build the unit tests and link against Google Test.
  • Define a version number inside CMake and print it to the output of the executable.
  • Print the Git hash to the output of the executable.
  • Create an installer so the program can be installed properly (GNU standards).
  • Create a DEB or RPM package (if relevant for your distribution).

fizz-buzz's People

Contributors

bast avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.