Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I am trying to output a double with only 2 decimal places

Status
Not open for further replies.

cory1

Programmer
Feb 24, 2003
7
US
I am using .NET and am having trouble formatting a double variable to the console window with two decimal places. I don't need to round the numbers because all of the values are no more than two decimal places long (ie 1.5, 1.55, 1)

I tried using the old way with "cout" with no luck. Please tell me how to do this in the .NET environment. Thanks in advance.

Cory
 
>> I am using .NET

You mean in a managed project using the .NET libraries?


-pete
I just can't seem to get back my IntelliSense
 
Yes in a managed C++ application.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top