#include <iostream> #include <string> #include <vector> using namespace std; #include "aluno.H" int main() { cout << "Introduza número de alunos: "; int numero_de_alunos; cin >> numero_de_alunos; cout << "Introduza os alunos (nome número nota):" << endl; vector<Aluno> alunos; for(int i = 0; i != numero_de_alunos; ++i) { string nome; int numero, nota; cin >> nome >> numero >> nota; alunos.push_back(Aluno(nome, numero, nota)); } double soma_das_notas = 0; for(int i = 0; i != numero_de_alunos; ++i) soma_das_notas += alunos[i].nota(); cout << "A média é: " << soma_das_notas / numero_de_alunos << " valores." << endl; }