Display disappear, how it sustain on the screen

#include <iostream.h>
#include <conio.h>
#include <stdlib.h>
#include <iomanip.h>
using std::cout;
using std::cin;
using std::endl;
using std::setw;

int main()
{
unsigned seed;
cout<<"Enter the seed: ";
cin>>seed;
srand(seed);
for (int i=1; i <= 10; i++)
cout<<setw(10)<<1+rand()%6;
if (1%5 == 0)
cout<<endl;


return 0;
getch();
}


//What command is used to make it stay on the screen, why we use "Using std::cout; and using std::setw etc???"
closed account (S6k9GNh0)
http://cplusplus.com/forum/beginner/1988/
Thanks alot
Topic archived. No new replies allowed.