c语言经典一百例-第4章
按键盘上方向键 ← 或 → 可快速上下翻页,按键盘上的 Enter 键可回到本书目录页,按键盘上方向键 ↑ 可回到本页顶部!
————未阅读完?加入书签已便下次继续阅读!
scanf(〃%d〃;&guess);
while(guess!=i)
{if(guess》i)
{printf(〃please input a little smaller。n〃);
scanf(〃%d〃;&guess);}
else
{printf(〃please input a little bigger。n〃);
scanf(〃%d〃;&guess);}
}
end=clock();
b=time(NULL);
printf(〃1: It took you %6。3f secondsn〃;var=(double)(end…start)/18。2);
printf(〃1: it took you %6。3f secondsnn〃;difftime(b;a));
if(var