Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

random c++

#include <cstdlib>
#include <ctime>
#include <iostream>

using namespace std;

int main() {
  srand((unsigned) time(0));
  int randomNumber = rand();
  cout << randomNumber << endl;
}
Source by www.bitdegree.org #
 
PREVIOUS NEXT
Tagged: #random
ADD COMMENT
Topic
Name
2+3 =