Mohd Hanafi

Discussion in 'Programmer's Corner' started by teleng, Jan 9, 2012.

  1. teleng

    Thread Starter New Member

    Dec 15, 2010
    9
    0
    Dear all,

    how to do convert decimal to float in c
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    You don't need to do more then just cast the type and the compiler will do it for you.

    Code ( (Unknown Language)):
    1.  
    2.     float F;
    3.     int I;
    4.  
    5.     F = (float) I;
    6.