I am writing this code to read a N integer array, then I suppose to check the even numbers and print them alone.
this is what I wrote, but I get this error: expression must have integral or unscoped enum type
#include <stdio.h>
void main(){
int N;
int count_even = 0, count_odd = 0;
scanf_s("%d", &N);
float *arr = new float[N];
for (int i = 0; i < N; i++){
scanf_s("%f", &arr[i]);
}
for (int j = 0; j < N; j++){
if (arr[j] % 2 == 1){
count_odd++;
}
}
}
the error on this line: " if (arr [j]) % 2 ==1)