ok i have to write a program that reduces fractions by using the euclidean algorithm....

i need help figuring out how to implement this algorithm into "C" code this is what my program looks like so far.......

/*project2*/

#include<stdio.h>

int main ()

{

int x,

y,

a,

b,

c,

result = 1;

printf("Enter a fraction\n");

scanf("%d/%d", &x, &y);

printf( "You entered %d/%d\n", x, y );

a = x / y;

b = x % y;

c = y;

if(x < y)

printf("That fraction reduces to %d/%d\n", &x, &y);

if(x = y)

printf("That fraction reduces to 1\n");

if(x > y)

{

while( result != 0)

result = b;

x = y;

y = result;

return 0;

}

Please.....any help(comments, hints) would be very much appreciated