Advertisement
esquilo10

Contador Ynoguti

Mar 22nd, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main () {
  6.     int nAlunos,i;
  7.     float nota;
  8.     cout << "Quantos alunos ?" << endl;
  9.     cin >> nAlunos;
  10.     i = 0;
  11.     while(i<nAlunos)
  12.     {
  13.      
  14.      cout << "Nota do aluno " << i+1 << endl;
  15.      cin >> nota;
  16.      if (nota > 60){
  17.          cout << "Passou !" << endl;
  18.      }
  19.      else {
  20.          cout << "Nao passou !" << endl;
  21.      }
  22.      
  23.       i++;
  24.     }
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement