考验一下大家的算法
:D很简单,用C语言编写一个函数,实现四舍五入的功能!要求结构最简单!
function(float a){
int b
return b;
}
大家补充完整吧:D
[[i] Last edited by 紫色流星 on 2005-4-10 at 13:13 [/i]] wo xue vb de [quote]Originally posted by [i]紫色流星[/i] at 2005-4-9 05:19 PM:
:D
function(int a){
int b
return b;
}
[/quote]
function(int a?)不是float?对整数四舍五入???? [quote]Originally posted by [i]天若无情[/i] at 2005-4-10 04:54:
wo xue vb de [/quote]
可以啊!我VB要比C好~ [quote]Originally posted by [i]nick[/i] at 2005-4-10 09:16:
function(int a?)不是float?对整数四舍五入???? [/quote]
呵呵~~丢人了~:P
改正!
页:
[1]