Код:
#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 n = m; 
    int array[n]; 
    int i; 
    for (i=0; i<n; i++) 
    { 
        cout<<i+1<<" mark: \n"; 
        cin>>array[i]; 
        cout<<"\n \n"; 
    } 
    uspeh(array, n); 
    cout<<"\n \n"; 
    system("PAUSE"); 
    return EXIT_SUCCESS; 
}
Това мисля че трябва да е за пета задача обаче ми дава 3 грешки на един от редовете и не мога да разбера къде бъркам