I am not completely sure what you want, but from the looks of it, it seems you are learning about loops in general. I suggest you take a look at this http://www.cplusplus.com/doc/tutorial/control/. This should help you learn more about loops, but to be more exact, skip to the While Loop section and check out the example code there. It is pretty close to what you are probably looking for, so that should help.
The link that you posted is broken.
My assignment requires me count the number of user inputs and some calculations. The only problem I have is starting it up. It is supposed to look like this
Enter values: 54.53 94.18 66.4 66.5 done
[4 values, average=70.40, standard deviation=16.82]
This is what I have so far
int run(istream& cin, ostream& cout)
{
// Variables
double value;
int count = 0;
double average;
double mean;
//mean = 0;
average = 0;
string s;
// Inputs
cout << "Enter values: ";
//cin >> value;
//cout << "[";
while (cin >> value >> s)
{
average = (average + value) / count;
//mean = average / count;
cout << average;
if (s == "done")
return 0;
else
count++;
}