如何找到下一组十个?

编程入门 行业动态 更新时间:2024-10-08 08:33:04
本文介绍了如何找到下一组十个?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

嗨。 假设我有一个数字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/

更多推荐

如何找到下一组十个?

本文发布于:2023-11-29 09:27:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1646003.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!