Round number up to the nearest multiple of 3

前端 未结 12 2060
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-28 08:39

Hay, how would i go about rounded a number up the nearest multiple of 3?

ie

25 would return 27
1 would return 3
0 would return 3
6 would return 6
         


        
12条回答
提交回复
热议问题