Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
372 B
1
Indexable
Never
#include <stdio.h>
 
int main(void)
{
    int a[10];
    int n, i,k=0;
 
    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("%i\n",a[i]);
            ++k;
        }
    printf("%i\n",k);
    return 0;
}
Leave a Comment