#include <iostream>
using namespace std;
int main() {
cout << "Quantidade de notas: ";
int qt;
cin >> qt;
int nt[qt] = {}; //isto é mais C que C++
int tot = 0;
for (int i = 0; i < qt; i++) {
cout << "Digite a nota " << i + 1 << " : " << endl;
cin >> nt[i];
tot += nt[i];
}
cout << "Media = " << tot / qt << endl;
}
//https://pt.stackoverflow.com/q/262773/101
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7Cgljb3V0IDw8ICJRdWFudGlkYWRlIGRlIG5vdGFzOiAiOwoJaW50IHF0OwoJY2luID4+IHF0OwoJaW50IG50W3F0XSA9IHt9OyAvL2lzdG8gw6kgbWFpcyBDIHF1ZSBDKysKCWludCB0b3QgPSAwOwoJZm9yIChpbnQgaSA9IDA7IGkgPCBxdDsgaSsrKSB7CgkgICAgY291dCA8PCAiRGlnaXRlIGEgbm90YSAiIDw8IGkgKyAxIDw8ICIgOiAiIDw8IGVuZGw7CgkgICAgY2luID4+IG50W2ldOwoJICAgIHRvdCArPSBudFtpXTsKCX0KCWNvdXQgPDwgIk1lZGlhID0gIiA8PCB0b3QgLyBxdCA8PCBlbmRsOwp9CgovL2h0dHBzOi8vcHQuc3RhY2tvdmVyZmxvdy5jb20vcS8yNjI3NzMvMTAx