Răspuns:
#include<iostream>
using namespce std;
int main()
{
int n,i;
cin>>n;
int*v=new int[n]; \\ alocare dinamica... daca n ai invatat pune int v[100]
int*w=new int[10]; \\alocare dinamica... daca n ai invatat pune int w[10]
for(i=0; i<10; i++)
W[i]=0;
for(i=0; i<n; i++)
{
cin>>v[i];
w[v[i] ]++;
}
cout<<"nota 10 au"<<w[10]<<endl;
cout<<"nota 9 au"<<w[9]<<endl;
cout<<"nota 8 au"<<w[8]<<endl;
cout<<"n au promovat"<<w[0]+w[1]+w[2]+w[3];
delete [ ]v; \\ doar daca ai alocat dibamic altfel nu mai pui
delete [ ]w; \\ doar daca ai alocat dibamic altfel nu mai pui
return 0;
}