TONYAZITEN 的 站内主页
2008
08-23
08-23
2008
08-10
08-10
char *s;
int nfrogs;
......
s=(nfrogs ==1 ) ? "" : "s";
printf("We found %d frog%s in the pond.\n",nfrogs,s);
这段代码没必要的部分我省略了,就是s=(nfrogs ==1 ) ? "" : "s"这一段不知道该怎样理解。非常感谢。
....
Read More >
2008
08-06
08-06
我是最近才开始学习c语言的。在我看的书中的有些练习题总会提到说某一个算法比另一个算法高效,比如有提到说在计算平方根的时候,Xi+1=0.5*(Xi+a/Xi)这种算法要比sqrt()高效。我不懂怎样就算是高效了,还望高手给予指点,十分感谢。....
Read More >