// Example use of the "for" loop
#include <iostream>
using namespace std;

int main()
{
  int n;
  float x, total=0.;

  cout << "How many values will you input? ";
  cin >> n;

  for (int i=1; i<=n; ++i) {
    cout << "Input value " << i << ": ";
    cin >> x;
    total += x;
  }

  float mean = total/n;

  cout << "The sum  is " << total << endl;
  cout << "The mean is " << mean << endl;

  return 0;
}
