Guest_imported
New member
- Jan 1, 1970
- 0
I want a C code which extracts the integer and decimal part separately from a float number.
Please help!!
Please help!!
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
float f_no=-123.45;
int i_no, i_dec;
i_no=(int)f_no;
i_dec=abs((f_no-(int)f_no)*10e5);
printf("Integer part=%d and fraction=%d",i_no,i_dec);