News for hackers. Stuff that matters.
Re:Why 37signals Doesn't Hire Programmers Based on Brainteasers by rayval on Thursday January 05, 2012 @07:08PM (#3431246)
For us old-school types, here's the 60-second version in C:

    int main(int argc, char ** argv) 
    { 
    	int i;
    	for (i=0; i< 100; i++)
    	{
    		if( (i%3==0)&&(i%5==0)) printf("FizzBuzz");
    		else if(i%3==0)         printf ("Fizz");
    		else if(i%5==0)         printf ("Buzz");
    		else                    printf("%d",i);
    		printf("\n");
    	}
    }

There are no comments on this comment yet.