Can someone tell me why this code doesn't work... :confused:
Code:#include <stdio.h>
int main(void) {
int a, i = 5.156546;
a = trunc(i);
printf("%d", a);
return(0);
}
And is there any other way to remove all numbers after a decimal place without using the trunc() function??