I'm writing a function that compares two fraction. if the fractions are equal it returns 0. If the fraction in the first parameter is less than the fraction in the second parameter it returns a negative number. Otherwise it returns a positive number. in doing so convert the fraction to a floating point number.
Im stuck need help completing the function to run
typedef struct fracion
{
int numo;
int denom;
}fraction;
int compareFractions (fracion, fraction);
void main()
{
int x;
fraction f1, f2;
printf("Enter Numo and Demo");
scanf_s("%d%d", &f1.numo, &f1.denom);
printf("Enter Numo and Demo");
scanf_s("%d%d", &f2.numo, &f2.denom);
x = compareFractions(f1, f2);
}
int compareFractions(fraction frac1, fraction frac2)
{
float conf1;
float conf2;