Advertisement
Tavxela

Untitled

Nov 13th, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. double Average(double, double);
  6.  
  7. int main() {
  8. double input1, input2;
  9. cin >> input1 >> input2;
  10. cout << Average(input1, input2) << endl;
  11. }
  12.  
  13. double Average(const double x, const double y)
  14. {
  15. double t;
  16. t = (x + y) / 2.;
  17. return t;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement