#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
void main()
{
clrscr();
int num,i;
randomize(); //randomize initializes the random number generator with a random value
for(i=0;i<6;i++)
{
num=random(100); //random with one parameter ...an int here
cout<<num<<endl;
}
getch();
}
@empress: that's not standard C++. There is no iostream.h header in C++, cout and endl are in the std namespace, and conio.h is DOS specific IIRC. Your compiler is very old. This will confuse beginners learning modern C++.