Şu satırı dahil ederiz
#include <math.h>
İmzası şöyle
float modff (float arg, float* iptr );
Açıklaması şöyle
Decomposes given floating point value arg into integral and fractional parts, each having the same type and sign as arg. The integral part (in floating-point format) is stored in the object pointed to by iptr.
Örnek
Şöyle yaparız
double intpart ; double fractional = modf(23.345, &intpart);//int part 23,fractional ise 0.345
Hiç yorum yok:
Yorum Gönder