Results 1 to 2 of 2

Thread: อยากทรายวิธีทำทศนิยมให้เป็นสองตำแหน่งอ่ะครับ

  1. #1
    teddy_toey
    Guest


    อยากทรายวิธีทำทศนิยมให้เป็นสองตำแหน่งอ่ะครับ

    อยากทราบวิธีทำทศนิยมให้เป็นสองตำแหน่งอ่ะครับ ตามนี้เลย
    รบกวนทีครับ ขอบคุณมากครับ

  2. #2
    Senior Member
    Join Date
    Jul 2004
    Location
    Bangkok
    Posts
    187


    Re: อยากทรายวิธีทำทศนิยมให้เป็นสองตำแหน่งอ่ะครับ

    float f = 1562.1564533f;
    int i = (int) f*100;
    float f2 = (float) i/100.0f;

Members who have read this thread : 0

Actions : (View-Readers)

There are no names to display.

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •