Here is what you need to do:
This will keep the window open to see the results. Or, if you know that your OS has a "PAUSE" command, you can do the following:
[code]#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
......
cout << endl;
system("PAUSE");
return 0;
}