i ran the program but it have errors. kindly check them huh? thanks!!
and..
please add codes for this to the program:
if a negative number is encountered, the program prompts the user" Negative number encountered" and ask for another input.
#include<stdio.h>
#include<conio.h>
void main(){
int a[10],b[10],c[10],i,j=0,k=0;
clrscr();
printf("Enter 10 positive numbers: \n");
for(i=0;i<10;i++){
scanf("%d",&a[i]);}
for(i=0;i<10;i++){
if((a[i]%2)==0){
b[j]=a[i];j++;}
else{
c[k]=a[i];
k++;
}
}
printf("The even numbers are: \n");
for (i=0;
i<j-1;j++)}
printf("%d\n",b[i]);
}
printf("The odd numbers are: \n");
for(i=0;
i<k-1;i++){
printf("%d\n",c[i]);}
getch();
}