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 / 2019
2018  |  2020
Subject: 
Re: Programming Brain Teaser
Newsgroups: 
lugnet.off-topic.geek
Date: 
Fri, 8 Sep 2000 03:36:29 GMT
Viewed: 
364 times
  
In lugnet.off-topic.geek, Matthew Miller writes:
DaveG <peagreen@intergate.ca> wrote:
#define madamimadam enifed#
Good one, works in perl, C, and C++ You win in my opinion.

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....
You got it right again you punk<grin>, Page 616:Programming Perl O'Reilly:
Statement-
A *command* to the computer about what to do next....Not to be confused with
a *declararation* which doesn't tell the computer to do anything, but just learn
something.


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

Well,

#define thisisnotapalindrome enifed#

This is not a line describing me laughing at your great joke.

Looks like we have to have it do something forwards and back.
Hmmmmm (smoke pours out of ears) thats a tough one.
DaveG



Message is in Reply To:
  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)

19 Messages in This Thread:







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

Custom Search

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