I have a float that must be entered from the keyboard and I want to check to make sure it is a number and not something else. How would you do that? Here is my function so far:
Thanks for any help.Code:float getfloat(char str[], float min){ float num ; printf("Please enter the %s of raffel tickets.\n", str); scanf("%f%*c", &num); while(num < min){ printf("Please enter a number greater than %.2f\n", min); scanf("%f%*c", &num); } return num; }