forum.dlang.org is now using DCaptcha

Kagamin via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Wed Dec 3 05:07:53 PST 2014


On Wednesday, 3 December 2014 at 00:56:12 UTC, Brad Anderson 
wrote:
> Maybe make the ones on d.learn extremely simple.
>
> ---
> What does the follow program print?
>
>     void main()
>     {
>         import std.stdio : writeln;
>         writeln("foo");
>     }
> ---
>
> No algorithms, no math. Just extremely basic stuff. Nobody, not 
> even our weirdly efficient resident furniture spam bot is going 
> to take the time to write a bot to answer a question like that.

Bots don't write bots, lol.

I think, a little math doesn't hurt.

void main()
{
     int a, b=2;
     a++;
     a = a+b+1;
     writeln("foo",a);
}


More information about the Digitalmars-d-announce mailing list