我想要舍入一个数字(十进制),以便它可以被5整除.
例如,我有一些数字和数字后的数字:
Number Rounded 0.4 5 3.4 5 7.3 10
我可以用ceil这个转换double到int并使用while循环,让他们的5的倍数,但我不知道是否有完成这个的任何聪明的办法.
ceil
double
int
while
谢谢.
c# math
c# ×1
math ×1