You are using various types all around: int, float, double.
For instance, in your ROOTS function you force the value to be returned as an integral number, losing all the decimal values.
When you print out the results, you tell the compiler to not print any decimal digits.
Your code fixed is below:
#include <math.h>
#include <stdio.h>
float ROOTS(int l, int m, int n)
{
return sqrt ((m * m) - (4 * l * n));
}
int main ()
{
int a, b, c;
printf("enter the co-effecients of the equation : ");
scanf("%d %d %d", &a, &b, &c);
float D = ROOTS(a, b, c);
printf("D: %f", D);
if (D > 0)
{
printf("\nthe roots are distinct and real \nroot 1 %f\nroot 2 %f", (-b + D) / (2.0f * a), (-b - D) / (2.0f * a));
}
else if (D == 0)
{
printf("\nthe roots are real and equal \nroot 1 %f\nroot 2 %f", -b / (2.0f * a), -b / (2.0f * a));
}
else if (D < 0)
{
printf ("\nno real roots");
}
return 0;
}