It will count from 0-9, 10-1, and repeat?
It will count from 0-9, 10-1, and repeat?
Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah
You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie
What was the point of taking Salem's code and stripping out all the newlines? And on an aside, the newline doesn't have to be decimal 10, IIRC.Originally posted by major_blagger
Code:main(){int i;for(*&i=0;(&i)[0]<012;0[&i]++)putchar(060^i|060|i^060);putchar(10);}
Quzah
Hope is the first step on the road to disappointment.
> and fluffing up the print with a no-op is rather like cheating
It took a long time to make that a palindrome
PS Jez
The tags use / not \
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
CORRECT !!! Xsquared you win a prize. The prize is the satisfaction of getting it right (o.k. I'm a cheapskate). You didn't cheat by running it did you?It will count from 0-9, 10-1, and repeat?
Sorry I had my fingers screwed on backwards.PS Jez
The tags use / not \
Originally posted by Prelude
>for(*&i=0;(&i)[0]<012;0[&i]++)putchar(060^i|060|i^060);
The loop control is a little cliche for obfuscated code, and fluffing up the print with a no-op is rather like cheating, don't you think?
What do you mean by 'obfuscated'? I always code like that.
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
For fun. Something tells me people aren't referring to this thread to get style tips.Originally posted by quzah
What was the point of taking Salem's code and stripping out all the newlines? And on an aside, the newline doesn't have to be decimal 10, IIRC.
Quzah
>You didn't cheat by running it did you?
Pfft. That takes all of the fun out of it.
Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah
You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie
a little convoluted, but not too bad...Code:main(){int n=057;while(n++-071)putchar(n);}
>It took a long time to make that a palindrome
Well, I suppose if that's what you were going for then I'll let you off the hook. But I'd be more impressed if you made the entire program a palindrome.
My best code is written with the delete key.
I couldn't resist throwing in a bit of recursion...
Code:#include <stdio.h> int main(int a,char *b[]) { putchar((a^sizeof(**b))?(a^0xb)?(main(a+sizeof(**b),b),0x3b-a):0x3b-a: (main(1<<1,b),((a<<a)|(a<<((a<<a)|a))))); return 0; }
DavT
-----------------------------------------------
I though calling main from main was not a good thing? I am sure it is just to show obfuscation.
Help populate a c/c++ help irc channel
server: irc://irc.efnet.net
channel: #c