Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  3620
Language: C/C++
Code:
#include <stdio.h>
int main(int argc, char *argv[])
int a[10];
    int n, i;
 
    printf("N: ");
    scanf("%i",&n);
    for (i=0; i<n; ++i){
        printf("a[%i] : ",i);
        scanf("%i",&a[i]);
    }
 
    for (i=0; i<n; ++i)
        if (a[i]%2 == 0)
            printf("%in",a[i]);
 
    for (i=n-1; i>=0; --i)
        if (a[i]%2 != 0)
            printf("%in",a[i]);
 
    return 0;
}
          
          
          
          
          
          
Comments: