QUOTE(shampaynes @ 25 Sep, 2008 - 08:47 PM)

Okay there are several things going on in this program of mine. First I let numbers be entered then print out it as a list. Then I print out the largest number entered. After that I reverse the entered list. Now I'm trying to split the list into odd and even list. But I keep getting errors with my odd and even function. Can anyone help me?
The Program is-
CODE
#include<stdio.h>
#include<iostream.h>
#include<conio.h>
main()
{
int a[10], i, n=1;
for(i=1;i<=10;i++)
{printf("Enter The NUMBER %d=",n);
scanf("%d",&a[i]);
n+=1;}
printf("Odd Numbers\tEven Numbers\n");
for(i=1;i<=10;i++)
{if(a[i]%2==0)
{printf("\t\t%d\n", a[i]);}
else
{printf("%d \n", a[i]);}
}
getch();
}
/*End Of Main*/
It works only with 10 No.s.
Please try this.
This post has been edited by Soura: 25 Sep, 2008 - 08:11 PM