嗨。 假设我有一个数字55.下一个确切的十个将是60.如果 我的数字是72,那么下一个确切的然后将是80等等。 是否有任何功能可以找到给定的 数的下一组十个?我读过数学课,但似乎它没有这样的功能。 问候, Robert Scheer
Hi. Suppose I have a number 55. The next exact set of ten will be 60. If my number is 72 the next exact set of then will be 80 and so on. Is there any function that can find the next set of ten of a given number? I read abou the Math class, but it seems that it doesn''t have such a function. Regards, Robert Scheer
推荐答案Robert Scheer写道: Robert Scheer wrote: 嗨。 假设我有一个数字55.下一个确切的十个将是60.如果 我的数字是72,那么下一个确切的设置将是80,依此类推。 是否有任何功能可以找到给定的 数的下一组十个?我读过数学课,但似乎它没有这样的功能。 问候, Robert Scheer Hi. Suppose I have a number 55. The next exact set of ten will be 60. If my number is 72 the next exact set of then will be 80 and so on. Is there any function that can find the next set of ten of a given number? I read abou the Math class, but it seems that it doesn''t have such a function. Regards, Robert Scheer
怎么样 y = Math.Ceiling(x / 10)* 10
How about y = Math.Ceiling(x / 10) * 10
Robert Scheer写道: Robert Scheer wrote: 嗨。 假设我有一个数字55.下一个确切的集合十个将是60.如果 我的数字是72,那么下一个确切的集合将是80,依此类推。 是否有任何功能可以找到给定的 数的下一组十个?我读过数学课,但似乎它没有这样的功能。 问候, Robert Scheer Hi. Suppose I have a number 55. The next exact set of ten will be 60. If my number is 72 the next exact set of then will be 80 and so on. Is there any function that can find the next set of ten of a given number? I read abou the Math class, but it seems that it doesn''t have such a function. Regards, Robert Scheer
没有任何功能可以做到这一点但这样可行: 整数=整数= 55 昏暗的结果为整数=((数字+10)\ 10)* 10 希望这有帮助 LS
There is no function to do that but this will work: Dim number as integer = 55 dim result as integer = ((number+10)\10)*10 Hope this helps LS
7月26日下午2:04 * pm,Lloyd Sheen< a ... @ b.cwrote: On Jul 26, 2:04*pm, Lloyd Sheen <a...@b.cwrote: Robert Scheer写道: Robert Scheer wrote: 嗨。 Hi.
假设我有一个数字55.下一个确切的十个将是60.如果 我的数字是72然后下一个确切的集合将是80,依此类推。 是否有任何功能可以找到给定的 数的下一组十个?我读过数学课,但似乎它没有这样的功能。 Suppose I have a number 55. The next exact set of ten will be 60. If my number is 72 the next exact set of then will be 80 and so on. Is there any function that can find the next set of ten of a given number? I read abou the Math class, but it seems that it doesn''t have such a function.
问候, Robert Scheer Regards, Robert Scheer
有没有功能,但这将工作: 整数数字=整数= 55 dim结果为整数=((数字+10)\ 10 )* 10 希望这有帮助 LS
There is no function to do that but this will work: Dim number as integer = 55 dim result as integer = ((number+10)\10)*10 Hope this helps LS
这肯定会奏效,但我不能说我曾经喜欢\> 除以整数铸造。我发现很多 的程序员(尤其是初级级别的人)不知道这个功能 ,这可能会导致一些非常困惑的维护程序员。对于 ,我强烈建议您每当使用该功能时,都会发表评论以确保未来的开发人员知道发生了什么。 谢谢, Seth Rowe [MVP] sethrowe.blogspot/
更多推荐
如何找到下一组十个?
发布评论