void sum(const int array[], int count)
{
int i;
int sum = 0;
for (i = 0; i < count; i++){
if(i % 2 == count)
sum = sum + array[i];
}
printf("The sum of the even numbers in the array is - %d",sum);
printf("\n\n");
}
This post has been edited by EricFG: 10 November 2008 - 09:44 PM

New Topic/Question
Reply




MultiQuote




|