Write FizzBuzz in any language of your choosing

Write FizzBuzz in any language of your choosing.
>Hard mode: you cannot use modulus, multiplication, or division.

I'll start:
t = [None, None, "Fizz", None, "Buzz", "Fizz", None, None, "Fizz", "Buzz",
None, "Fizz", None, None, "FizzBuzz"]
c = 0

for i in range(1, 101):
print(i if not t[c] else t[c])
c += -14 if c == 14 else 1

msg db 'fizzbuzz'

What situation would I realistically encounter that would prevent me from using modulus?

Fan-fucking-tastic. I fell through a temporal disturbance and ended up at reddit in 2006.

t. brainlet
this is proof that neo-g is full of pajeets

>hey look I arbitrarily made this task harder haha thank god im not a street shitter

t. too dumb to write fizzbuzz w/o modulus, multiplication, or division

main = putStr
$ unlines
$ take 100
$ zipWith (\x y -> if null y then show x else y)
(iterate (+1) 1)
$ zipwith (++)
(repeat ["","","fizz"])
(repeat ["","","","","buzz"])

>Write FizzBuzz in any language of your choosing.

フィッツバズ

kek

import fizzbuzz

It's more so to test your problem solving skills. If you want to go the "what situation would require me not to use modulus" route we could also say "in what situation would I need fizzbuzz." This is true for most programming practice problems. People's first program isn't "Hello World" because that's a common issue in the industry. That's people's first program because it introduces them to the syntax, Fizzbuzz introduces them to modulus, etc. It's all about building your problem solving skills.

>fizzbuzz thread

print "1"
print "2"
print "fizz"
print "4"
print "buzz"
print "6"
print "7"
print "8"
print "9"

Hard mode, no modulus, multiplication, or division.
-module(fizzbuzz).
-export([generate/1]).

generate(N) ->
generate(1, 1, 1, N).

generate(A, B, N, N) ->
case {A, B} of
{3, 5} ->
"fizzbuzz";
{3, _} ->
"fizz";
{_, 5} ->
"buzz";
{_, _} ->
integer_to_list(N)
end;
generate(A, B, N, M) ->
case {A, B} of
{3, 5} ->
"fizzbuzz " ++ generate(1, 1, N + 1, M);
{3, _} ->
"fizz " ++ generate(1, B + 1, N + 1, M);
{_, 5} ->
"buzz " ++ generate(A + 1, 1, N + 1, M);
{_, _} ->
integer_to_list(N) ++ " " ++ generate(A + 1, B + 1, N + 1, M)
end.

print "1";print "2";print "fizz";print "4";print "buzz"
print "fizz";print "7";print "8";print "fizz";print "buzz"
print "11";print "fizz";print "13";print "14";print "fizzbuzz"
print "16";print "17";print "fizz";print "19";print "buzz"
print "fizz";print "22";print "23";print "fizz";print "buzz"
print "26";print "fizz";print "28";print "29";print "fizzbuzz"
print "31";print "32";print "fizz";print "34";print "buzz"
print "fizz";print "37";print "38";print "fizz";print "buzz"
print "41";print "fizz";print "43";print "44";print "fizzbuzz"
print "46";print "47";print "fizz";print "49";print "buzz"
print "fizz";print "52";print "53";print "fizz";print "buzz"
print "56";print "fizz";print "58";print "59";print "fizzbuzz"
print "61";print "62";print "fizz";print "64";print "buzz"
print "fizz";print "67";print "68";print "fizz";print "buzz"
print "71";print "fizz";print "73";print "74";print "fizzbuzz"
print "76";print "77";print "fizz";print "79";print "buzz"
print "fizz";print "82";print "83";print "fizz";print "buzz"
print "86";print "fizz";print "88";print "89";print "fizzbuzz"
print "91";print "92";print "fizz";print "94";print "buzz"
print "fizz";print "97";print "98";print "fizz";print "buzz"

Easy mode in Python, zzz

for i in range(1, 101):
if i%3 == 0:
if i%5 == 0:
print('FizzBuzz')
else:
print('Fizz')
elif i%5 == 0:
if i%3 == 0:
print('FizzBuzz')
else:
print('Buzz')
else:
print(i)

>>Hard mode: you cannot use modulus, multiplication, or division.
Easy
### Functions ###
range = $(if $(filter $1,$(lastword $3)),$3,$(call range,$1,$2,$3 $(words $3)))
make_range = $(foreach i,$(call range,$1),$(call range,$2))
equal = $(if $(filter-out $1,$2),,$1)


### Variables ###
limit := 101
numbers := $(wordlist 2,$(limit),$(call range,$(limit)))

threes := $(wordlist 2,$(limit),$(call make_range,$(limit),2))
fives := $(wordlist 2,$(limit),$(call make_range,$(limit),4))

fizzbuzz := $(foreach v,$(numbers),\
$(if $(and $(call equal,0,$(word $(v),$(threes))),$(call equal,0,$(word $(v),$(fives)))),FizzBuzz,\
$(if $(call equal,0,$(word $(v),$(threes))),Fizz,\
$(if $(call equal,0,$(word $(v),$(fives))),Buzz,$(v)))))


### Target ###
.PHONY: all
all: ; $(info $(fizzbuzz))

Is that a fucking makefile

Yes, it is.

...

...

...

I'm a brainlet, what fucking language is this and what is this code

H-how does one reach this level of wizardry?

It's FizzBuzz implemented in GNU Make.

Excuse my ignorance, but why is that worthy of a reaction?

Well, Make is a language for writing build scripts (usually on Linux and usually for C or C++) and it's old as in ancient. It's not really a programming language at all, and I'm surprised that it actually works seeing how Make has no concept of arithmetics or loops at all....

Don't need any stinkin' arithmetics to be Turing complete, you know. Make can call functions recursively and has a concept of lists and their lengths. That's all you ever need.

Functional programming was NOT a mistake.

...

Is it still valid if I use division for something outside the core logic? Need it for printing.

How'd I do?

public class Main {

public static void main(String[] args) {
for(int i = 1; i

Bretty gud

r..really? Why is this considered a hard thing by some people?

super duper crazy mega challenge:
write a program that is relevant to an arbitrary real-life task, useful, efficient, and extensible.

>r..really?
Yes.

>Why is this considered a hard thing by some people?
It's not (but it does test very basic programming skills like loops and conditions), we like to pretend that it is on Sup Forums and then make absurd versions of it.

Lua, not using modulus, multiplication or division.
f, b = 0, 0
for i = 1,100 do
f = f+1
b = b+1
local res = ""
local fizz = f==3
local buzz = b==5
if fizz then
res = res.."Fizz"
f = 0
end
if buzz then
res = res.."Buzz"
b = 0
end
if not fizz and not buzz then
res = i
end
print(res)
end

var randomNumber = Math.round(Math.random() *15);

if (randomNumber%3 === 0){
alert ('fizz');
} else if (randomNumber%5 === 0){
alert('buzz');
}
else {
console.log(randomNumber);
}


writing it without modulus would mean a lot of else if's

>15
meant 100
either way, easy task with modulus

fuck me did it wrong

var randomNumber = Math.round(Math.random() *100);

if (randomNumber%3 === 0 && randomNumber != 0){
alert ('fizz');
} else if (randomNumber%5 === 0 && randomNumber != 0){
alert('buzz');
}
else {
console.log(randomNumber);
}

This is wrong

This is probably one of the best posts on Sup Forums in a while.

#include

int main()
{
int i, f = 2, b = 4;

for ( i = 1 ; i