This program tell you how to Generate a Random no. every time u run the program.


void main()


int rnum ,i ;

for (i=0; i<=5; ++i)

cout<<(rnum=rand() ) << endl;



Now See here Rnum is used to get random number.

 i<=5 it means that it will select from 1 to 5 number it self
Designed By Blogger Templates | Templatelib & Distributed By Blogspot Templates