Left on my white board

Sander left the following message for me on my whiteboard:

#include (std lib.h7);

int main()
{
for(int fat=800;fat>200;fat++)
{
printf (“keep eating fatso!\n”);
printf (sander weights %d pounds\n”, fat) ;
printf (“God Help Us \n”);
}
return 0;
}

**DANGER! Neverending Loop!

13 thoughts on “Left on my white board

  • 10/20/2006 at 11:43 am
    Permalink

    You could do it recursively, and get a stack overflow because Sander is so fat.


    #include <stdio.h>

    #define DELTA_LARD 100

    void sanderWeighs(int);

    int main() {
      sanderWeighs(200);
      return(0);
    }

    void sanderWeighs(int lard) {
      printf("Sander's lard weighs %d kilotons\n", lard);
      sanderWeighs(lard + DELTA_LARD);
    }

    Reply
  • 10/20/2006 at 12:19 pm
    Permalink

    I don’t know where mike D got that 7 from. I wrote stdlib instead of stdio…good catch, Schenkster!
    DELTA_LARD
    I know delta means variance, but when I read that it sounds like a movie they might make after Chuck Norris gains a few hundred pounds.

    Reply
  • 10/20/2006 at 7:22 pm
    Permalink

    ewww java

    Trying to learn it at the moment via lectures, tutorials and labs. I officially don’t understand.

    maybe I should try to stay awake!

    Reply
  • 10/21/2006 at 11:47 am
    Permalink

    This is standard C code. I learned some C++ in college, which is basically the same stuff, just some different commands like “printf” vs cout

    Reply
  • 10/21/2006 at 3:38 pm
    Permalink

    if ( it.wasJava() )
    {
    The.Syntax().wouldLook( AwfulFactory.createNewAwful( new ReallyAwful() ) );
    }

    Reply
  • 10/23/2006 at 7:35 am
    Permalink

    The loop would eventually end. Assuming Sander runs in 32-bit, after hitting 2,147,483,647 pounds, the program would wrap around and Sander would then begin weighing in at a negative value. This, of course, makes perfect sense, as at that size, he would obviously collapse into a black hole, thus destroying all ability to measure him.

    Reply
  • 10/23/2006 at 10:48 am
    Permalink

    Actually int fat gives up only 16 bits of memory to my girth. 65535 lbs.? Please, that’s like…35 Volkswagens. Psshshh, that ain’t no black hole.

    Reply
  • 10/24/2006 at 5:59 pm
    Permalink

    ^_^ Oh Sander, you make me chuckle. LOL

    Reply

Leave a Reply to Sander Cancel reply

Your email address will not be published. Required fields are marked *