I'm working on a problem for my programming class at the moment and cant figure out how to determine if the number is even before including it in the sum. This is what I have so far, my compiler says there is an error with the if statement but I am not sure what else to do.

Any help would be appreciated. The goal is to find the sum of the even numbers.Code:void sum_even(void) { int A[10], i, num, sum=0; for(i=0;i<10;i++); { printf("Enter the value for A[%d]: ",i); scanf("%d", &A[i]); if(A[i]%2=0) num=A[i]; sum=sum+num; } printf("The sum of the even numbers is %d.", sum); }