Skip to content

Instantly share code, notes, and snippets.

@blake41
Created April 9, 2014 19:39
Show Gist options
  • Save blake41/10306693 to your computer and use it in GitHub Desktop.
Save blake41/10306693 to your computer and use it in GitHub Desktop.
Create a folder in your todos repo called "Loops".
Inside it, create 2 folders:
times_five
fizzbuzz
The 'times_five' folder should contain a file called times_five.js and times_five.rb. Each file should contain code which, when ran, will print each number, 1-100, multiplied by 5.
Fizzbuzz folder should contain a single file "fizzbuzz.rb" that does the following:
(CHALLENGE: do it in javascript)
prints numbers 1-100
when the number is divisible by 3, say fizz
when the number is divisible by 5 say buzz
when the number is divisible by 3 and 5 say fizzbuzz
e.g.
1
2
fizz
4
buzz
6
7
8
fizz
buzz
11
fizz
13
14
fizzbuzz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment