via Digitalmars-d Sat, 28 Mar 2015 05:56:14 -0700
You can clear the input stream:
while(getchar() != '\n') {};
Or just use readln:
int resp = readln.chomp.to!int;