|
Rage wrote: if (c==30)
Is actually:
if (c == 90) thus dividing by 9 would yield 10, a newline character;
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
this is how we could see it in a better view :
<font color=blue>#include</font> <stdio.h>
<font color=blue>int main</font>(<font color=blue>void</font>) {
<font color=blue>int</font> a = 0,
b = 10,
c = 10; <font color=green>
<font color=blue>char</font>* pszMap =
<font color=gray>"- FIGURE?, UMKC,XYZHello Folks,"
"TFy!QJu ROo TNn(ROo)SLq SLq ULo+"
"UHs UJq TNn*RPn/QPbEWS_JSWQAIJO^"
"NBELPeHBFHT}TnALVlBLOFAkHFOuFETp"
"HCStHAUFAgcEAelclcn^r^r\\tZvYxXy"
"T|S~Pn SPm SOn TNn ULo0ULo#ULo-W"
"Hq!WFs XDt!"</font>;
a = pszMap[b+21];
b++;
<font color=blue>while</font> (a != <font color=gray>'\0'</font>) {
<font color=blue>while</font> (a > 64) {
a--;
c++;
<font color=blue>if</font> (c == 'Z') {
c /= 9;
putchar(c);
}
<font color=blue>else</font> {
putchar(33 ^ (b & 1));
}
}
a = pszMap[b+21];
b++;
}
<font color=blue>return</font> 0;
}
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
|
|
toxcct wrote: i love that sort of tests
me too
#include "stdio.h"
main()
{
int b=0,c=0,q=60,_=q;for(float i=-20,o,O=0,l=0,j,p;j=O*O,p=l*l,
(!_--|(j+p>4)?fputc(b?q+(_/3):10,(i+=!b,p=j=O=l=0,c++,stdout)),
_=q:l=2*O*l+i/20,O=j-p+o),b=c%q,c<2400;o=-2+b*.05);
}
...
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
|
|
|
yes, it will work.
i forget how i worked that thing out, but i think the o gets initialized before its value is ever used for anything meaningful.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
ahh , i did not look correctly...
in for(float i=-20,o,O=0,l=0,j,p;j=O*..... , o is defined as a float, such as i, O, l, j, p...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
i don't have any compiler there, so tell me if i'm wrong :
<font color=blue>#include</font> <font color=gray>"stdio.h"</font> <font color=green>
<font color=blue>void main</font>(<font color=blue>void</font>) {
<font color=blue>int</font> b = 0,
c = 0,
q = 60,
_ = q;
<font color=blue>float</font> i = -20,
o = 0,
O = 0,
l = 0,
j = 0,
p = 0;
<font color=blue>do</font> {
j = O * O;
p = l * l;
<font color=blue>if</font> ((!_) | ((j+p) > 4)) {
i += !b;
p = j = O = l = 0;
<font color=blue>if</font> (b != 0) {
fputc((q + (_ / 3)), <font color=blue>stdout</font>);
}
<font color=blue>else</font> {
fputc(10, <font color=blue>stdout</font>);
}
c++;
}
<font color=blue>else</font> {
l = (2 * O * l) + (i / 20);
O = j - p + o;
}
_--;
b = c % q;
o = -2 + b * 0.05;
} <font color=blue>while</font> (c < 2400);
}
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
|
|
|
even I tooooooooo
never say die
|
|
|
|
|
toxcct wrote: i love that sort of tests
Well here is another one,
Writen in the wee hours of the morning
??=define _i_ int
??=define _i (??/
_i_
??=include<stdio.h>
_i_ main ??/
_i ??/
__i, char* ??/
i_??/
??(??/
??))
??=define _endl_ ;
??<char _s??/
??(9??/
??), _i__??/
??(4??/
??) _endl_
??=define _s_ _endl_ _s
??<_s_ ??/
??(0??/
??) = '??/
??=' _s_ ??/
??(1??/
??) = '??/
??(' _s_ ??/
??(2??/
??) = '??/
??/??/' _endl_
??=define _m_(m_) ? m_ :
??>_s_ ??/
??(3??/
??) = '??/
??)' _s_ ??/
??(4??/
??) = '??/
??'' _s_ ??/
??(5??/
??) = '??<' _endl_
??=define _START(s) for _i __i__ = s _endl_
??<_i_ e = (__i == 2) ? (((*i_??/
??(1??/
??)-0x30) < 0) ??/
??!??/
??! ((*i_??/
??(1??/
??)-0x30) > 9)) _m_(9) (*i_??/
??(1??/
??)-0x30): 9 _endl_
??=define _VALIDATE(v) __i__ < e _endl_ __i__++)
??<_s_ ??/
??(6??/
??) = '??/
??!' _s_ ??/
??(7??/
??) = '??/
??>' _s_ ??/
??(8??/
??) = '??-' _endl_
??>
??=define move_to(n) case n:
??<_START(0) _VALIDATE(0)
??=define skip ) _endl_ break _endl_
??<switch (__i__)
??< move_to(0)
??=define to_mem sprintf (_i__,
??<to_mem "??/
???/?=" skip
??> move_to(1)
??=define _do_i_ "%d. "
??< to_mem "??/
???/?(" skip
??>move_to(2)
??< to_mem "??/
???/?/" skip
??> move_to(3)
??< to_mem "??/
???/?)" skip
??=define move_screen printf (
??=define show_single(i) , _s ??/
??(i??/
??)
??=define _char_ " %c"
??>move_to(4)
??< to_mem "??/
???/?'" skip
??> move_to(5)
??< to_mem "??/
???/?<" skip
??=define _endl_null_ return 0 _endl_
??>move_to(6)
??< to_mem "??/
???/?!" skip
??> move_to(7)
??< to_mem "??/
???/?>" skip
??=define _text_ " %s means "
??>move_to(8)
??< to_mem "??/
???/?-" skip ??>
??>move_screen _do_i_ "_text_"_text_"_char_"_char_"??/
??/n", __i__, _i__ show_single (__i__)) _endl_
??>
??>
??> _endl_null_
??>
Have fun
codito ergo sum
|
|
|
|
|
of course, we have to know the C++ compiler digrams/trigrams... which i actually don't know by heart, and hope i'll never have to code this way !!!
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
We discovered the excistance of trigraphs during an assembly analysing session
trying to figure why this d*mned compiler didn't something completly different
than designed to
codito ergo sum
|
|
|
|
|
|
You (we?) have done the trivial part. Now as to understand how the india map is encrypted in the string is another story...
~RaGE();
|
|
|
|
|
|
Maybe not.
Obviously, the string contains three infos : spaces, ! and when to print a carriage return.
Since c is always incremented, a carriage return is output whenever c reaches 30.
Otherwise, a ! is printed if b is even and a space is printed if b is odd. Since b is incremented only in the first for, then each letter in the string describes a sequence of spaces or of !. So to print 14 spaces, 15 !, [here you must print at least 30 spaces before carriage return, so] 30 spaces, 1 carriage return, 26 spaces, 17 !,
you have in the string 14+64 , 15+64, 30+26+64, 17+64, and so on.
So it is not that complicated I could even draw the map of France
~RaGE();
|
|
|
|
|
i do not understand well, but i'll firstly try to run it at how this evening (as i don't have any VC++ installed at office)...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
Actually I was wrong. c is of no use actually, since there is a bug in the code and it does not get reinitialised to 0. so the carriage return is only set once.
The code prints out the india map only on a 'standard' dos box, with standard size. So the code in the map is even simpler, it is 64+number of spaces, 64+number of !,64+number of spaces, 64+number of !,and so on.
Cristal clear
~RaGE();
|
|
|
|
|
Try this out:
int a,b,c;
int count = 1;
for (b=c=10;a="Hello!CodeProjectRules!HHHFHDEDZ!NBIJG \
DCDZ!OBICDCHDADZ!PBICDCIGZ!QBICDCHDADZ!P \
BIJGDCDZ!OBJHGDEDZ!N!Z!Z!Z" [b+++13]; )
for(; a-- > 64 ; )
putchar (33^b&1);
~RaGE();
|
|
|
|
|