Conversion
-
Hi Everyone I need a help, i have a number for eg :- 9.5 i want it to be 9.05 while taking to database cause if use round of it will give 9.50 but i want 9.05. am using C# 2005. Thanks In Advance
-
Hi Everyone I need a help, i have a number for eg :- 9.5 i want it to be 9.05 while taking to database cause if use round of it will give 9.50 but i want 9.05. am using C# 2005. Thanks In Advance
rowdykuttan wrote:
I need a help, i have a number for eg :- 9.5 i want it to be 9.05 while taking to database cause if use round of it will give 9.50 but i want 9.05. am using C# 2005.
Can you rephrase what you are trying to accomplish? Not sure I follow.
It isn't enough to do well in life. One must do good when and where one can. Otherwise, what's the point?
-
rowdykuttan wrote:
I need a help, i have a number for eg :- 9.5 i want it to be 9.05 while taking to database cause if use round of it will give 9.50 but i want 9.05. am using C# 2005.
Can you rephrase what you are trying to accomplish? Not sure I follow.
It isn't enough to do well in life. One must do good when and where one can. Otherwise, what's the point?
It seems that he wants to redefine how mathematics works.
Deja View - the feeling that you've seen this post before.
-
It seems that he wants to redefine how mathematics works.
Deja View - the feeling that you've seen this post before.
Yes, but in what way?
-
It seems that he wants to redefine how mathematics works.
Deja View - the feeling that you've seen this post before.
Pete O`Hanlon wrote:
It seems that he wants to redefine how mathematics works.
Thanks for the chuckle - that might just be the case. :) I wanted to give the author the benefit that it might just be a language issue, though.
It isn't enough to do well in life. One must do good when and where one can. Otherwise, what's the point?
-
Hi Everyone I need a help, i have a number for eg :- 9.5 i want it to be 9.05 while taking to database cause if use round of it will give 9.50 but i want 9.05. am using C# 2005. Thanks In Advance
double answer; if(dbNumber == 9.5) { answer = 9.05; return answer; }
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy The people in the lounge said I should google for the answer to a programming question but I do not know what search engine to use
-
double answer; if(dbNumber == 9.5) { answer = 9.05; return answer; }
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy The people in the lounge said I should google for the answer to a programming question but I do not know what search engine to use
ROTFL !!!!
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
Hi Everyone I need a help, i have a number for eg :- 9.5 i want it to be 9.05 while taking to database cause if use round of it will give 9.50 but i want 9.05. am using C# 2005. Thanks In Advance
Hi, Try using this
double d = 9.5; d = Math.Floor(d) + ((Math.Floor(d) + 1) - d) / 10;
Paras Kaneriya
The difference between genius and stupidity is that genius has its limits.