Alrigth heres ur code a bit modified i didn't realize that you posted a code using the fuction.. sorry for the earlier assumption. u left out the %f in the printf function:
Code:#include <stdio.h> #include <conio.h> float RoundToNearestQuarter(float); int main(void) { float input; float answer; printf("Enter Number: "); scanf("%f", &input); answer = RoundToNearestQuarter (input); printf("The answer is: %f", answer); getch(); return 0; } float RoundToNearestQuarter (float num) { int n = num * 4; return (float)n/4; }