New Comments

Calendar

October 2006
M T W T F S S
« Sep   Nov »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Site

Left on my white board

October 20th, 2006 by mike d. in Work

currently eating: chicken.

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!

RSS feed

13 Comments »

Comment by Ryan Schenk |
2006-10-20 11:43:16

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);
}

Comment by Sander |
2006-10-20 12:19:24

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.

Comment by Ryan Schenk |
2006-10-20 12:50:06

Sweet bazooka(s)!

 
 
 
Comment by marian |
2006-10-20 19:22:40

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!

Comment by Ryan Schenk |
2006-10-21 15:38:29

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

Comment by Roland |
2006-10-21 19:06:23

ha

 
Comment by dinane |
2006-10-23 07:31:42

That is priceless!

 
 
 
Comment by Sander |
2006-10-21 11:47:59

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

 
Comment by dinane |
2006-10-23 07:35:38

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.

Comment by Sander |
2006-10-23 10:48:18

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.

Comment by Jon Abad |
2006-10-23 11:41:16

clap…

clap…

clap…

 
 
 
Comment by Marcia |
2006-10-24 17:58:05

*Glorp* 8-|

 
Comment by Marcia |
2006-10-24 17:59:01

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

 
Name (required)
E-mail (required - never shown publicly)
URI
Subscribe to comments via email
Leave a Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> in your comment.
Arizona Landscaping - Internet Marketing - United Specialties - Credit Cards