I am trying to figure out how to print floating point numbers without using library functions. Printing the decimal part of a floating point number turned out to be quite ea
This program will work for you.
#include int main() { float num; int z; scanf("%f",&num); z=(int)num; printf("the integral part of the floating point number is %d",z); }