computing the GCD non-recursively

Hello,

I am working on this program that needs to compute the GCD non-recursively the programs has no errors but when it says result is not initlized because of this it aborts.

#include "stdafx.h"

#include "stdio.h"

int main (void)

{

int a,b,c,r,result;

printf("enter a value for a\n");

scanf ("%d", &a);

printf("enter a value for b\n");

scanf ("%d", &b);

printf("The result is %d\n",result);

{

if (a < b)

c = a;

a = b;

b = c;

return 0;

}

while(1)

int c;

{

c = a%b;

if(c==0)

return b;

a = b;

b = c;

}

}