1. ## bugs and recursion

Im having trouble figuring this problem out. I need to be able to make this function recursive and there is also another bug in here can anybody try it and help me fix it. Any help would be would work thanx. Heres my source code.
#include <stdio.h>

int main (void)
{
int x;
int y;
int n;

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

if(y==0)
else if (x<y)
{n=x;
x=y;
y=n;}
else
{n=x;
x=y;
y=n%y;}

return 0;
}

2. ## wher?

im sorry i did not get you right...
where is that function?

maybe prelude can comment on that

3. I couldn't even get it to compile.

: : edit : :
I think Prelude might be busy. It's a slim possibility.

4. >and there is also another bug in here
You have a little problem matching your else with the rest of the conditional statements. Here:
Code:
```  y=n;
}
else```
The printf call ends the first series of tests, so the else after that is illegal. This may not be what you wanted, your intentions are a bit confusing in this program:
Code:
```#include <stdio.h>

int main (void)
{
int x;
int y;
int n;

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

if(y==0)
else if (x<y) {
n=x;
x=y;
y=n;
}
else {
n=x;
x=y;
y=n%y;
}
return 0;
}```
>I need to be able to make this function recursive
You don't want to call main recursively, is there another function you were talking about? Because as it is this program really wouldn't benefit from recursion.

-Prelude

5. What exactly do you mean with 'recursive'?
Do you mean I want to repeat entering numbers?
Code:
```int main()
{
while(scanf(%d%d))
{
}
return 0;
}```

6. ## oh no

you gotta read real books i think

recursion,

it is a function calling itself. recursion can be use to get a factorial of a number... i cant go into detail right now... please do read your book...

7. I know what recursion means (have some experience with Miranda and Prolog). I was just wondering if he knows. Couldn't find any recursion in his code.