why display is not sustain, it disappears

#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();
}
Last edited on
Remove semicolon after class gradebook.
Place it after last curly parenthesis before main()
thanks it works
Topic archived. No new replies allowed.