Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ random number

#include<stdlib.h>
#include<ctime>
using namespace std;
//Generate random numbers
int main(){
	srand(time(0));
	for (int i = 0;  i < 10; i++){
		cout<< (rand() % 10) + 1<<" ";
Source by cplusplus.com #
 
PREVIOUS NEXT
Tagged: #random #number
ADD COMMENT
Topic
Name
4+8 =