Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Your output has to match the example outputs given below. Make sure your output

ID: 3867442 • Letter: Y

Question

Your output has to match the example outputs given below. Make sure your output doesn't just work in cmd but all compilers. There are 2 examples below. Spacing, wording, and everything has to be the same. ALSO, you can only use **<iostream> Thanks for your help!

CMPSC 101 LAB 13 - Fun with arrays Write a program that reads 15 numbers (integers) from stdin, then displays the following: The total of the even numbered values (2nd value+ 4th value+ etc..) The total of the odd numbers (1st value + 3rd value + etc...) The total of every 5th number. Note that “even numbered values" mean the 2nd value, 4th value, etc., not “2”, “4". "6", etc. For example: The data is: 0,1,2,3,4,5, 6,7,8,9,10,11,12,13,14 The even values are: 1+3+5+7+9+11+13- 49 The odd values are: 0+2+4+6+8+10+12+14 = 56 Every fifth values are: 4+9+14 = 27 Another example: The data is: 7,3, 9,11,25,47,98,45,76, 21,99,35,67,83,12 The even values are: 3+11+47+45+21+35+83 = 245 The odd values are: 7+9+25+98+76+99+67+12 = 393 Every fifth values are: 25+21+12 -58 Run it 5 times with different data, including the two above examples. Then, following the instructions in the "How to package and submit your labs" video, package up your work. Double check to confirm that the package is complete (i.e., all the header info, the code, the screen shots, the output, etc.), and then submit it to the drop box Next, go back and confirm that the submission is in the drop box!

Explanation / Answer

NOTE: I have completed the code for your assignment. Please check and let me know if you face any issues. I will revert back within 24 hours.

Code:
#include <iostream>
using namespace std;

int main()
{
    int arr[20], num, i, sum;

    // Taking 15 integer numbers from user
    cout << " Enter the 15 integer numbers: ";
    for(i = 0; i < 15; i++){
        cin >> num;
        arr[i] = num;
    }
  
    // printing given values
    cout << " The data is: ";
    for(i = 0; i < 15; i++){
        if(i < 14)
            cout << arr[i] << ",";
        if(i == 14)
            cout << arr[i];
    }
    // printing the even numbers
    cout << " The even values are: ";
    for(sum = i = 0; i < 15; i++)
        if((i+1) % 2 == 0){
            cout << arr[i] << "+";
            sum += arr[i];
        }
    cout << "" << " = " << sum;
    // printing odd numbers
    cout << " The odd values are: ";
    for(sum = i = 0; i < 15; i++)
        if((i+1) % 2){
            cout << arr[i] << "+";
            sum += arr[i];
        }
    cout << "" << " = " << sum;
    // printing every fifth element
    cout << " Every fifth values are: ";
    for(sum = i = 0; i < 15; i++)
        if((i+1) % 5 == 0){
            cout << arr[i] << "+";
            sum += arr[i];
        }
    cout << "" << " = " << sum << endl;
  
    return 0;
}

Code output screenshot:
https://pasteboard.co/GDbJrF3.png
https://pasteboard.co/GDbJCnd.png