Step-by-step explanation:
in C++
#include<iostream.h>
#using namespace std;
main()
{
int array[8];
int oddSum=0;
for(int i=0; i<8;i++)
{
if(array[i]%2==1)
{
oddSum=oddSum+array[i];
}
else()
{ //do nothing }
}
cout<<"The sum of odd numbers are:"<<oddSum;
getch();
return 0;
}