Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

I Propose a challenge. (FIZZ BUZZ)

Name: Anonymous 2007-09-01 20:19 ID:Ei0Nz+V2

The fizz buzz challenge

Make a program(in the language of your choice), that goes like this:

1)Prints all numbers from one to one hundred
2)For every number that can be divided with 3, it writes "fizz" next to the number.
3)For every number that can be divided with 5, it writes "buzz".

Should look like this:

1
2
3 Buzz
4
5 Fizz
6 Buzz
7
8
9 Buzz
10 Fizz
11
12 Buzz
13
14
15 FizzBuzz
16
17
18 Buzz

This a common problem employers give to seperate the Expert programers from the Enterprise Qulity Programmers. Surprisingly, not many programmers can. I made one in BASIC in 5 minutes.

Lets see how /PROG/ stands up to this.

Name: Anonymous 2007-09-03 18:38 ID:Heaven

>>108
What errors did gcc give you? (and what version of gcc are you building it with?) I tested it with 3.4.6 when I wrote it, though looking back there are at least a few unnecessary parts, if not something that breaks standards.

lol templates.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List