Print a triangle

Joel via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Apr 29 05:01:19 PDT 2016


On Friday, 29 April 2016 at 11:31:51 UTC, rikki cattermole wrote:
> Not entirely the goal I'm guessing output wise, but this works.
>
> import std.range : repeat;
> foreach(line; 1 .. 11) {
> 	writeln('#'.repeat(line));
> }

That is shorter than my foreach version, but I want one that 
doesn't use foreach in it at all.


More information about the Digitalmars-d-learn mailing list