i need rounding help


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: i need rounding help

  1. #1
    Join Date
    Dec 2005
    Posts
    4

    i need rounding help

    how would i round a number like 1.00000001 to 2?

  2. #2
    Join Date
    Aug 2005
    Location
    Melbourne...Australia
    Posts
    279
    2 Decimal places??

    Code:
    System.out.printf("%.2f", floatvariable);

Similar Threads

  1. Replies: 2
    Last Post: 09-27-2006, 08:29 PM
  2. Rounding a value
    By burung in forum Java
    Replies: 1
    Last Post: 08-14-2005, 08:11 PM
  3. Replies: 1
    Last Post: 07-14-2005, 09:17 AM
  4. Rounding in MSH Flexgrid
    By Teddy in forum VB Classic
    Replies: 0
    Last Post: 02-14-2002, 12:14 PM
  5. Javascript rounding error
    By Wayne Hou in forum Web
    Replies: 0
    Last Post: 01-29-2001, 10:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center