Author: Dieter Buerssner
Date: 12:19:39 07/31/03
Go up one level in this thread
On July 31, 2003 at 11:25:58, Robert Hyatt wrote:
>On July 30, 2003 at 11:16:30, Omid David Tabibi wrote:
>
>>On July 30, 2003 at 09:29:50, Tony Werten wrote:
>>
>>>On July 30, 2003 at 06:29:43, Omid David Tabibi wrote:
>>>
>>>>float o=0.075,h=1.5,T,r,O,l,I;int _,L=80,s=3200;main(){for(;s%L||
>>>>(h-=o,T= -2),s;4 -(r=O*O)<(l=I*I)|++ _==L&&write(1,(--s%L?_<(L)?--_
>>>>%6:6:7)+"World! \n",1)&&(O=I=l=_=r=0,T+=o /2))O=I*2*O+h,I=l+T-r;}
>>>
>>>
>>>You've given a good reason not to use C :)
>>
>>Not to use C? Just #include <io.h> and you have the above program as C++ !
See my comment about write() and io.h in the other article. I think the
following code is Standard C and Standard C++.
#include <stdio.h>
float o=0.075,h=1.5,T,r,O,l,I;int _,L=80,s=3200;int main(){ for(;s%L||(h-=
o,T = -2),s;4 -(r=O*O)<(l = I*I)|++ _==L&&fwrite((--s%L?_<(L)?--_%6:6:7) +
"World! \n",1,1,stdout)&&(O=I=l=_=r=0,T+=o/2))O=I*2*O+h,I=l+T-r;return 0;}
L is the line length (one character less will be visual). s is the number of
characters written to screen. o and h define the part of the image of this
"Apfelmännchen" (don't know the English term), that will be shown. You can
change all of those. s%L should be zero.
Regards,
Dieter
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.