C++ Program to Generate Random Numbers

#include<iostream>
#include<time.h>
#include<stdlib.h>

using namespace std;

int main()
{
int a;
srand((unsigned)time(NULL));
a=rand();
cout<<a;
return 0;
}

Comments

Popular posts from this blog

Binary Search, Linear Search, Selection Sort and Bubble sort Python Menu Program

Housie/Tambola using Python with Tickets in PDF file

100% Working C++ Tambola/Housie Code with 90 Unique Numbers