if a number contains fractional part or not in C

#include<stdio.h>
int main()
{
	float a;
	int b;
	printf("Enter no ");
	scanf("%f", &a);
	b = (int) a;
	if (b < a)
		printf("There is a fractional part..");
	else
		printf("There is no fractional part..");
	return 0;
}