>>355
scanf を実行する前に標準出力を /dev/null につけかえるのでは、pipe(), pipe2() とかで?