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 / 2016
2015  |  2017
Subject: 
Re: Programming Brain Teaser
Newsgroups: 
lugnet.off-topic.geek
Date: 
Fri, 8 Sep 2000 02:13:13 GMT
Viewed: 
194 times
  
In lugnet.off-topic.geek, David Goeb writes:
In lugnet.off-topic.geek, Matthew Miller writes:
richard marchetti <blueofnoon@aol.com> wrote:
Yeah, and maybe I am going to have to kick this guy until he is dead.  His
solution was:

printf("abcdefghijklmnopqrstuvwxyz"); // • ;("abcdefghijklmnopqrstuvwxyz")ftnirp

'Course, that's not legal C....

Not even legal Perl and he did say Perl.
Only works in C++ or in a C with C++ extentions.
Kick him twice as much. And (MattM) you may be right that the ; alone
is to taking a liberty with the term statement.
DaveG

'Course, if ';' doesn't count as a statement, it makes it much more
difficult, since most commands end with a ';', and therefore have to start with
one as well if they're to be read in backwards-- making it two statements... I
suppose you could do:

#define madamimadam enifed#

But even neater would be to constrain the problem such that the statement
couldn't be a palandrome...

DaveE



Message has 1 Reply:
  Re: Programming Brain Teaser
 
(...) Good one, works in perl, C, and C++ You win in my opinion. (...) What a nasty addition to the problem. Gonna have to think about it... DaveG (24 years ago, 8-Sep-00, to lugnet.off-topic.geek)

Message is in Reply To:
  Re: Programming Brain Teaser
 
(...) Not even legal Perl and he did say Perl. Only works in C++ or in a C with C++ extentions. Kick him twice as much. And (MattM) you may be right that the ; alone is to taking a liberty with the term statement. DaveG (24 years ago, 8-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