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

fizzbuzz

Name: Anonymous 2011-03-25 23:20

Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.

Language: C
Difficulty: One line of code (i.e. one semicolon).

Shortest program wins.

Name: Anonymous 2011-03-26 3:50

>>7

ffffffuuuuuuuuuu, can't get below 102.

main(){int x=0;for(;++x-101;)x%5?x%3?printf("%d\n",x):puts("fizz"):x%3?puts("buzz"):puts("fizzbuzz");}

still shorter than >>3

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