Advertisement
filomancio

Media Con Funzioni

Mar 1st, 2012
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include "iostream"
  2.  
  3. float Media(int a, int b, int c);
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     int a,b,c;
  10.     cin>>a>>b>>c;
  11.     cout<<Media(a,b,c)<<endl;
  12.     system("PAUSE");
  13.     return 0;
  14. }
  15.  
  16. float Media(int a, int b, int c)
  17. {
  18.     return (a+b+c)/3.;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement