Update all new Tasks

This commit is contained in:
Ingy döt Net 2015-02-20 09:02:09 -05:00
parent 00a190b0a6
commit 91df62d461
5697 changed files with 93386 additions and 804 deletions

View file

@ -0,0 +1,16 @@
void main() {
import std.stdio, std.range, std.algorithm, std.conv,
std.string, std.regex;
"Numbers please separated by space/commas: ".write;
immutable numbers = readln
.strip
.splitter(r"[\s,]+".regex)
.array /**/
.to!(real[]);
immutable mm = numbers.reduce!(min, max);
writefln("min: %4f, max: %4f", mm[]);
immutable bars = iota(9601, 9609).map!(i => i.to!dchar).dtext;
immutable div = (mm[1] - mm[0]) / (bars.length - 1);
numbers.map!(n => bars[cast(int)((n - mm[0]) / div)]).writeln;
}