Hey, Can i get help too? I have a problem same with this guy, now i got far in coding and learned alot while doing so but i have a slight problem, in those 3 displays (ODD,EVEN,PRIME)

if i input (1,2,3,4,5)

it should display

EVEN:2,4

ODD;1,3,5

PRIME;1,2,3,5

but instead it displays something like this

even;0,2,0,4,0

odd;1,0,3,0,5

prime:1,2,3,0,5

help please!

Code:#include<stdio.h> #include<conio.h> int sum (int); float average (float,float); void even (int,int); void odd (int,int); void prime (int,int); void factorial (int,int); int ehold[20],ohold[20],phold[20],fhold[20],facthold[20],ucnt=0; main() { int N,Ncnt,tsum=0,num; clrscr(); printf("Enter N numbers: "); scanf("%d",&N); for (Ncnt=1;Ncnt<=N;Ncnt++) { printf("Value of Number %d - ",Ncnt); scanf("%d",&num); tsum=sum(num)+tsum; even(num,Ncnt); odd(num,Ncnt); if ((num%Ncnt)==0) { prime(num,Ncnt); } factorial(num,Ncnt); } printf("\nSum: %d",tsum); printf("\nAverage: %.1f",average(tsum,N)); printf("\n\nEVEN numbers: "); for (ucnt=1;ucnt<Ncnt-1;ucnt++) { printf("%d,",ehold[ucnt]); } printf("\b "); printf("\n\nODD numbers: "); for (ucnt=1;ucnt<Ncnt-2;ucnt++) { printf("%d,",ohold[ucnt]); } printf("\b "); printf("\n\nPRIME numbers: "); for (ucnt=1;ucnt<=Ncnt-1;ucnt++) { printf("%d,",phold[ucnt]); } printf("\b "); printf("\n\nFactorial:"); for (ucnt=1;ucnt<=Ncnt-1;ucnt++) { printf("\n\tValue %d - %d = %d",ucnt,fhold[ucnt],facthold[ucnt]); } getch(); return 0; } int sum (int a) { int sum=0; return sum=a+sum; } float average (float s,float c) { float ave; ave=s/c; return (ave); } void even (int e,int o) { if ((e%2)==0) ehold[o]=e; } void odd (int o,int d) { if ((o%2)>0) ohold[d]=o; } void prime (int p,int r) { int test,cnt,prc=0; for (cnt=1;cnt<=p;cnt++) { if ((p%cnt)==0) prc++; } if (prc<=2) { phold[r]=p; } } void factorial (int f,int a) { int fact=1,cnt; for (cnt=1;cnt<=f;cnt++) { fact=fact*cnt; } fhold[a]=f; facthold[a]=fact; }