#include <iostream>
#include <string>
#include <iomanip>

using namespace std;

void Saisie(const int dim, int &S, int A[]);
void Affichage(int S, const int A[]);

void main()
{
	const int dim = 7;
	int i, A[dim], S = 0;

	Saisie(dim, S, A);
	Affichage(dim, A);

	/*S = 0;
	for (i = 0; i < 7;i++) {
		S += A[i];
	}*/
	cout << "\nLa somme est = " << S << "\n";
}

void Saisie(const int dim, int &S, int A[])
{
	cout << "Saisie:\n";
	for (int i = 0; i < dim; i++)
	{
		cout << "Entrez A[" << i << "]= ";
		cin >> A[i];
		S += A[i];
	}
}

void Affichage(const int dim, const int A[])
{
	cout << "Affichage:\n";
	for (int i = 0; i < dim; i++)
	{
		cout << "A[" << i << "]=" << A[i] << "\n";
	}
}
