Skip to content

GabrielAllba/FizzBuzz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Fizz Buzz

The Fizz Buzz is a classic developer interview question that is asked or referred to so often for so long, it is almost a cliché!. This training project, prepared by Codecademy.

Table of Contents

Project Prompt

Write a fizzbuzz.cpp program that outputs numbers from 1 to 100.

But for multiples of 3, print Fizz instead of the number and for the multiples of 5, print Buzz. For numbers which are multiples of both 3 and 5 print, FizzBuzz.

2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
17
Fizz
19
Buzz
    ...
97
98
Fizz
Buzz
Happy coding!

Technologies

  • C++

Setup

How to compile and execute:

  1. Download sortinghat.cpp.
  2. Open command line interface and navigate to the directory where the files are downloaded.
  3. Run the following commands to compile and execute the program:
g++ fizzbuzz.cpp -o fizzbuzz
./fizzbuzz

Sources

Codecademy's Learn C++ Course.

About

CodeCademy C++ Course: FizzBuzz Challenge

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages