0

im trying to sort my random numbers to odd numbers and even numbers,,

the last part of my code is really wrong.....(the sorting part)

```
my code:
#include<time.h>
int main()
{
int num[50];
int x,odd,even;
srand(time(NULL));
for(x=0; x<50; x++)
{
num[x] = (rand()%60)+40;
}
for(x = 49; x>-1; x--)
{
[B]if(num[x] % 1==0)
{
num[x]=odd;
}
if(num[x] % 2==0)
{
num[x] = even;
}
printf("%d\n", odd);
printf("%d\n", even);[/B]
}
getch();
return;
}
```