hello..i need some help with my program. i cant get any of my functions to return their values in to the main function to print :-(

the purpose of the program is to add, subtract, multiply, and divide rational numbers.

this is my code:

#include<stdio.h>

struct rationalType{

int numerator;

int denominator;

};

typedef struct rationalType rationalType;

rationalType add(rationalType fraction1, rationalType fraction2);

rationalType subtract(rationalType fraction1, rationalType fraction2);

rationalType multiply(rationalType fraction1, rationalType fraction2);

rationalType divide(rationalType fraction1, rationalType fraction2);

rationalType add(rationalType fraction1, rationalType fraction2)

{

int denom, num1, num2;

rationalType result;

denom = fraction1.denominator * fraction2.denominator;

num1 = (denom/fraction1.denominator) * fraction1.numerator;

num2 = (denom/fraction2.denominator) * fraction2.numerator;

result.numerator = num1 + num2;

result.denominator = denom;

printf("%d/%d", result.numerator, result.denominator);

return result;

}

rationalType subtract(rationalType fraction1, rationalType fraction2)

{

int denom, num1, num2;

rationalType result;

denom = fraction1.denominator * fraction2.denominator;

num1 = (denom/fraction1.denominator) * fraction1.numerator;

num2 = (denom/fraction2.denominator) * fraction2.numerator;

result.numerator = num1 - num2;

result.denominator = denom;

return result;

}

rationalType multiply(rationalType fraction1, rationalType fraction2)

{

rationalType result;

result.numerator = fraction1.numerator * fraction2.numerator;

result.denominator = fraction1.denominator * fraction2.denominator;

return result;

}

rationalType divide(rationalType fraction1, rationalType fraction2)

{

rationalType result;

result.numerator = fraction1.numerator * fraction2.denominator;

result.denominator = fraction2.denominator * fraction2.numerator;

return result;

}

int main(void)

{

rationalType fr1;

rationalType fr2;

rationalType result;

printf("Enter the First Fraction: " );

scanf("%d/%d", &fr1.numerator, &fr1.denominator);

printf("Enter the Second Fraction: ");

scanf("%d/%d", &fr2.numerator, &fr2.denominator);

printf("\nHere are the results: \n");

add(fr1, fr2);

printf("Sum : %d/%d\n", result.numerator, result.denominator);

subtract(fr1, fr2);

printf("Difference : %d/%d\n", result.numerator, result.denominator);

multiply(fr1, fr2);

printf("Product : %d/%d\n", result.numerator, result.denominator);

divide(fr1, fr2);

printf("Quotient : %d/%d\n", result.numerator, result.denominator);

}

and also..another question. my answers need to be in simplest form. so if the answer is 3/6 it should be reduced to 1/2. so basically my two questions are: how do i get my results to return and print and how would i make it so that the result printed is in its simplest form?

any help is greatly appreaciated! thanks in advance...