Здравейте ще помогнете ли малко за задача 5!Значи според мен кода е това но ми дава 3 грешки на един и същ ред и не мога да разбера къде бъркам.
Код:#include <cstdlib> #include <iostream> #include<cmath> #include<string> using namespace std; void uspeh (int array[], int m) { int i; for (i=0; i<m; i++) { cout<<array[i]<<"; "; } double sum = 0; for (i=0; i<m; i++) { sum = sum + array[i]; } cout<<"\n \n Middle: "<< double(sum / m)<<". \n \n"; } int main(int argc, char *argv[]) { int m; // count of the students cout<<"Enter m. \n \n"; cin>>m; cout<<"\n \n"; int array[m]; int i; for (i=0; i<m; i++) { cout<<i+1<<" mark: \n"; cin>>array[i]; cout<<"\n \n"; } uspeh(array, m); cout<<"\n \n"; system("PAUSE"); return EXIT_SUCCESS; }





