objective c float numer conversion
===


      float f2,f1 = 123.125;
   
 what is different between them? 

      
      float f1 = 123.125,f2;

if I write code as 

    float f1,f2 = 123.125
the program will has different result 

here is the full program 

       float f2,f1 = 123.125;
        //float f1 = 123.125,f2;
        int i1,i2 = -150;
        
        i1 = f1; //floating to integer 
        NSLog(@"%f assigned to an int produces %i",f1,i1);
        
        f1 = i2; //integer to floating
        NSLog(@"%i assigned to a float produces %f",i2,f1);
        
        f1 = i2/100; //integer divided by integer
        NSLog(@"%i divied by 100 prouces %f",i2,f1);
        
        f2= i2/100.0; //integer divided by a float
        NSLog(@"%i divied by 100.0 produces %f",i2,f2);
        
        f2= (float)i2 /100; // type cast operator
        NSLog(@"(float))%i divided by 100 produces %f",i2,f2); 