Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <stdlib.h>
- using namespace std;
- int main ()
- {
- int i, alunos;
- float notas, somanota;
- cout<<"Informe a quantidade de alunos: ";
- cin>>alunos;
- somanota = 0;
- i = 0;
- while ( i < alunos )
- {
- cout<<"Informe as notas: ";
- cin>>notas;
- somanota = somanota + notas;
- i++;
- }
- cout<< "A quantidade de alunos eh: "<<alunos<<endl;
- cout<< "As notas foram: "<<notas<<endl;
- cout<< "A media da turma eh: "<<somanota/alunos<<endl;
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement