#WSQ10<\/a><\/p>\n This program is created using arrays in order to store a maximum of numbers entered by the user.<\/p>\n After that, the stored numbers can be used to create a sum of them and the average of them as well. This works because we created a function that stored 5 numbers (array [5]) in order to be able to ask the user for 5 numbers to be stored.<\/p>\n here is the code with notes to be better understanded:<\/p>\n #include<\/a> <iostream><\/p>\n using namespace std;<\/p>\n <\/p>\n int main(){<\/p>\n int array [5]; \/\/declaring the array with a maximum of 5 values<\/p>\n <\/p>\n for (int i=0; i<5; i++){ \/\/the first loop will sotre the values from 0 to 4 (including 0)<\/p>\n cout << “please give us a number: “;<\/p>\n cin >> array [i]; \/\/ the program will read the values that the user enters until value # 4<\/p>\n <\/p>\n }<\/p>\n for (int i=0; i<5; i++){ \/\/ the program will show the values that the user entered<\/p>\n cout << array [ i ]<<endl;<\/p>\n }<\/p>\n int sum = 0;\/\/fisrt variable to sum the values from the array<\/p>\n int average,sum1;<\/p>\n for (int i = 0; i < 5; ++i)\/\/ this loop will give the program all the values from the array in order to sum them<\/p>\n sum+=array[i];\/\/ sums the values given by the array<\/p>\n average = sum\/5; \/\/gets average<\/p>\n cout<<” Average:”<<average;<\/p>\n <\/p>\n <\/p>\n return 0;<\/p>\n }<\/p>\n <\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":" #WSQ10This program is created using arrays in order to store a maximum of numbers entered by the user.After that, the stored numbers can be used to create a sum of them and the average of them as well. This works because we created a function … Continue reading