What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-09-13 19:06:03
seed random c++
#include<iostream> #include<cstdlib> using namespace std; int main() { int random = rand(); /* No srand() calls before rand(), so seed = 1*/ cout << "Seed = 1, Random number = " << random << endl; srand(5); /... Add solution -
C 2021-09-11 00:11:03
random en c
#import <stdlib.h> #import <time.h> int r; srand(time(NULL)); r = rand(); /* This will give you a pseudo random integer between 0 and RAND_MAX. srand(time(NULL)) is used to give it a random starting seed, based on the current time. rand() ... Add solution
Best helpers
A. Pettit
+5
Moo-Juice
+5
Jeff Ava
+5
Pharma
+5
Seige
+5
Parallax
+5
PixelZerg
+5
Akiman Barwa
+5
Andrew Lowe
+5
JohnDoe
+5
Meaning
+5
Mahnaz
+5
Silver Rain
+5
Tralston
+5
Rahul Ramesh
+5
Jcjr
+5
Thruston
+5
Alec Cook
+5
Catimann
+5
PeterBocan
+5