//This program takes daily sales amounts over a period of time 
//and calculates their total.
#include <iostream>
#include <iomanip>
using namespace std;

int main ()
{
	int days;				//number of days
	double total = 0.0;		//accumulator, initialized with 0
	
	//get the number of days.
	cout << "For how many days do you have sales amounts? ";
	cin >> days;
	
	//get the sales for each day and accumulate a total.
	for (int count = 1; count <= days; count++)
	{
		double sales;
		cout << "Enter the sales for day " << count << ": ";
		cin >> sales;
		total += sales;		//Accumulate the running total.
	}
	
	//display the total sales.
	cout << fixed << showpoint << setprecision(2);
	cout << "The total sales are $" << total << endl;
	return 0;
}
