(Move to ...)
▼
Program to illustrate the rand( ) function
#include<iostream.h>
#include<conio.h>
#include<stdlib.h> // defines the rand( ) function
void main ( )
{
int z ;
z = rand ( ) ;
cout<< "\n The 1st random number is "<<z ;
z = rand () ;
cout<< "\n The 2nd random number is "<<z ;
getch ( ) ;
}
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment