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 / 2017
2016  |  2018
Subject: 
Re: Programming Brain Teaser
Newsgroups: 
lugnet.off-topic.geek
Date: 
Fri, 8 Sep 2000 02:22:33 GMT
Viewed: 
277 times
  
In lugnet.off-topic.geek, David Eaton writes:
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#

Good one, works in perl, C, and C++ You win in my opinion.


But even neater would be to constrain the problem such that the statement
couldn't be a palandrome...
What a nasty addition to the problem. Gonna have to think about it...
DaveG



Message has 1 Reply:
  Re: Programming Brain Teaser
 
(...) Yeah, I thought of that one, but I'm not sure it counts as a statement. In perl, of course, it's a comment. And in C/C++, it's a preprocessor directive.... (...) Well, #define thisisnotapalindrome enifed# :) (24 years ago, 8-Sep-00, to lugnet.off-topic.geek)

Message is in Reply To:
  Re: Programming Brain Teaser
 
(...) ;("abcdefghijklmnopq...yz")ftnirp (...) '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 (...) (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