Click here to Skip to main content
16,018,418 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want the rounded off value from the rounded value like :




If value is in between 5.000001 - 5.999999 result should be 6.


Please Help me out..

Thanks In advance....
Posted

1 solution

In C# using
C#
Math.Ceiling(inputValue)

In javascript using
JavaScript
Math.ceil(inputValue)
 
Share this answer
 
Comments
arunsiddhu1992 11-May-15 4:47am    
It does not work for me.
I'm using javascript for that purpose.
Please give another soution if you have.
thanks.
anpxbkhn 11-May-15 4:56am    
I write
console.log(Math.ceil(5.000001));
console.log(Math.ceil(5.999999));
and result are 6 both
I tested in IE11, FF and Chrome.
What browser you use?
arunsiddhu1992 13-May-15 4:26am    
Thanks.
It's done.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900