The correct (verified) output of
Math.Round
is
1.0
when input is 1.2
96
when input is 95.55
They are different from the ones you reported.
[update]
Quote:
I want round value when the entered value is 1.01 then it show 2
i want like this ..
is it possible
Yes, it is possible: use
Math.Ceiling[
^] instead of
Math.Round
.
[/update]
[update 2]
Quote:
hi, i am tried "Math.Ceiling" but it gives out same as a "Math.Round"
They do NOT give 'the same results', try:
Dim a() As Double = {1.2, 95.55}
Dim ro(2) As Double
Dim ce(2) As Double
ro(0) = Math.Round(a(0))
ro(1) = Math.Round(a(1))
ce(0) = Math.Ceiling(a(0))
ce(1) = Math.Ceiling(a(1))
Console.WriteLine("ro(0)={0}, ro(1)={1}", ro(0), ro(1))
Console.WriteLine("ce(0)={0}, ce(1)={1}", ce(0), ce(1))
[/update 2]