Question: Write a C program to input n numbers in an array, calculate the sum of all even numbers and all odd numbers in the array
Write a C program to input n numbers in an array, calculate the sum of all even numbers and all odd numbers in the array and print the larger sum. marks
Example:
If the array contains the following elements:
The sum of all even elements is
Sum of all odd elements is Therefore, the output should be
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
