To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.off-topic.geekOpen lugnet.off-topic.geek in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Off-Topic / Geek / 1999
1998  |  2000
Subject: 
Re: Programming Brain Teaser
Newsgroups: 
lugnet.off-topic.geek
Date: 
Thu, 7 Sep 2000 07:43:09 GMT
Viewed: 
133 times
  
In lugnet.off-topic.geek, David Goeb writes:
Just an off the cuff answer.

And a good one. Thanks for the replies.  I think I am beginning to see some
ways into it that I hadn't thought of.

The way I was understanding the puzzle (and you know that people have a
tendency to explain things quite poorly AND I tried to imitate the precise
wording of the puzzle as it was posed to me) was that it was actually supposed
to run (i.e. compile and actually print its statement backwards and forwards,
that statement being a string of some kind). I'll mess with it some more and
get the answer from the fellow who posed it.  Having his supposed answer might
help me to make it a more tightly worded puzzle next time.  Usually when I
don't get it, it's the wording of the puzzle...

Maybe I'm just being dense today -- who knows?

-- Richard



Message has 2 Replies:
  Re: Programming Brain Teaser
 
(...) thx (...) I may be dense too, just thought of it a ; on a line alone fits exactly the definition as stated. Going to sleep now before I think of more [/:-) DaveG (24 years ago, 7-Sep-00, to lugnet.off-topic.geek)
  Re: Programming Brain Teaser
 
(...) Yeah, and maybe I am going to have to kick this guy until he is dead. His solution was: printf("abcdefghijkl...tuvwxyz"); // ;("abcdefghijklmnopq...yz")ftnirp Which I would like to point out doesn't print anything in the second instance (...) (24 years ago, 7-Sep-00, to lugnet.off-topic.geek)

Message is in Reply To:
  Re: Programming Brain Teaser
 
(...) #include <stdio.h> #include <stdlib.h> #include <time.h> void rof(void) {}; void main(){ int C; C = 0 // line below ; for (C;C;C) rof; // Ok so its lame } // Should be valid in perl too, but I am not sure. Just an off the cuff answer. DaveG (24 years ago, 7-Sep-00, to lugnet.off-topic.geek)

19 Messages in This Thread:







Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR