Write a C Program to accept N integer numbers and store them
Solution
/* The following is the c code to display the even and odd arrays seperately out of the given array */
#include<stdio.h>
 #include<math.h>
 int main()
 {
    int a[20],b[20],c[20],i,n;
    printf(\"enter the size of array that can hold upto 20 integers\");
    scanf(\"%d\",&n);
    printf(\"enter the a[20] array elements \");
   
    for(i=0;i<n;i++)
    {
        scanf(\"%d\",&a[i]);
    }
   
    printf(\"even elements of the array in the given a[20] array is b[20]: \\t\");
   
    for(i=0;i<n;i++)
    {
        if(a[i]%2==0)
        {
        printf(\"%d\\t\",a[i]);
        }
    }
    printf(\"\ \");
    printf(\"odd elements of the array in the given a[20] array is c[20]: \\t\");
   
    for(i=0;i<n;i++)
    {
        if(a[i]%2==1)
        {
        printf(\"%d\\t\",a[i]);
        }
    }
   
 }

