wap in c++ to find the sum of 10 different decimal numbers using an array
i swear i would mark anyone who answers this correct as brainlest
Answers
Answered by
0
Step-by-step explanation:
void main()
{ int A[10],n, i, s=0;
cout <<” enter 10 numbers “;
for ( i=0;i<10;i++)
cin >>A[i];
for ( i=0;i<10;i++)
{ if( A[i]%2! =0)
{ s+=A[i];
}}
cout << s;
}
Although program was easy but it took me 20mins to type. :)
Similar questions