Skip to main content

ex6.cpp


// Solution to Exercise 6
// (NDE, 2014-01-03)
#include <iostream>
using namespace std;
int main()
{
  double x, y;
  cout << "Enter two numbers: ";
  cin >> x >> y;
  double average = (x + y) / 2;
  cout << "Average = " << average << endl;
  return 0;
}