Question: In C Given the integer array yearlyMiles with ARR _ VALS elements, write a for loop that assigns sumEvens with the sum of all the
In C
Given the integer array yearlyMiles with ARRVALS elements, write a for loop that assigns sumEvens with the sum of all the even integers in yearlyMiles.
Ex: If the input is then the output is:
Even sum:
#include
int mainvoid
const int ARRVALS ;
int yearlyMilesARRVALS;
int i;
int sumEvens;
for i ; i ARRVALS; i
scanfd &yearlyMilesi;
Your Code Here
printfEven sum: d sumEvens;
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
