Advertisement
ruben718

Media aritemetica

Jan 26th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <cstdlib>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main(){
  7.     int nota1, nota2, nota3, media;
  8.     cout << "Insira a primeira nota! ";
  9.     cin >> nota1;
  10.     cout << "Insira a segunda nota! ";
  11.     cin >> nota2;
  12.     cout << "Insira a terceira nota! ";
  13.     cin >> nota3;
  14.     media = ((nota1+nota2+nota3)/3);
  15.     cout << "A media aritemetica e " << media << endl;
  16.     system("PAUSE");
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement