Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3.  
  4. int main()
  5. {
  6. float resultado= 0;
  7. int alunos = 0;
  8. std::cout<<"Numero de Alunos: ";
  9. std::cin>>alunos;
  10. float vetor[alunos];
  11. for(int x = 0;x<alunos;x++);
  12. {
  13. std::cout<<"Nota do Aluno "<<x<<":";
  14. std::cin>>vetor[x];
  15. resultado = resultado+vetor[x];
  16. }
  17. std::cout<<"Media dos alunos:"<<resultado/alunos;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement