Cursos
Cursos
Compilador de Código
Compilador de Código
Discutir
Teams
Fazer login
Registrar
Menu
Q&A Discussões
Pesquisar
Pesquisar
Faça uma pergunta
Faça uma pergunta
Why does rand() keep giving me same number?
beginner
c++
conio.h()
rand()
random()
-1 Voto
2 Respostas
29th Apr 2020, 11:04 AM
Prashant Pant
Write a program to generate random integer without using rand() function.
c++
problem
programming
4 Votos
3 Respostas
27th Mar 2017, 8:34 AM
Hemant Khorwal
where to use rand() and random() in C
c
c++
0 Voto
2 Respostas
8th Jul 2016, 12:56 PM
Manthan Patil
Why rand() value is fixed after running code once????
c++
rand()
random_value
0 Voto
2 Respostas
4th Mar 2019, 12:09 PM
김준석
Explain random no generators , srand(), rand() etc?
c++
0 Voto
1 Resposta
9th Dec 2016, 10:47 AM
Morpheus
What is the difference between rand() and srand()??? please clarify...
c++
rand
3 Votos
3 Respostas
31st Jan 2016, 7:58 AM
RAVI KUMAR G
can anybody specify default seed value for rand() function??
c++
rand
0 Voto
3 Respostas
3rd Oct 2016, 3:15 PM
HARiSH
When can we use the rand() function and how ?!
cpp
1 Voto
4 Respostas
20th Mar 2017, 10:20 AM
azize bnd
How we can create random function with using built-in rand() function..??
functions
logic
programming
rand
1 Voto
4 Respostas
24th Aug 2019, 5:41 AM
Vaidehi Chotaliya
What is the difference between srand() and rand() function?
rand
0 Voto
2 Respostas
4th Mar 2018, 6:28 PM
Ipshita Pal
How strings are randomly choose using rand() in c or c++ ?
c
c++
2 Votos
6 Respostas
23rd Apr 2018, 12:20 PM
Pragati Mahajan
Why does my function rand() return the same number all the time?
c++
rand
3 Votos
7 Respostas
19th Sep 2017, 10:49 PM
Oleksandr Rubtsov
How rand() function works in a program.Pease explain anyone
arguments
c++
comments
function
rand()
0 Voto
2 Respostas
28th Nov 2017, 4:29 PM
Suraj Satankar
so naturally rand() % X goes from 0 -> X-1?
c++
rand
0 Voto
3 Respostas
14th Oct 2016, 5:22 AM
lucas
How to use rand() function without comming same value in c++
rand
1 Voto
3 Respostas
25th Feb 2018, 4:25 PM
Vibeeshanan Vibee
Please explain me the rand() and srand() function in c++?
coder
0 Voto
2 Respostas
26th Sep 2017, 5:55 AM
Prateek Gupta
Can anyone tell me what is the difference between rand() and srand()???
c++
rand
1 Voto
5 Respostas
24th Sep 2017, 1:21 PM
SANJEET KUMAR
What is the difference bwtween srand() and rand() functions in C++
c++
rand
0 Voto
3 Respostas
7th Aug 2017, 4:03 PM
Anjana S. Arjunan
[C++] rand() is giving me the same number over and over
c++.
number
programming
rand()
random
1 Voto
2 Respostas
14th Apr 2017, 12:35 AM
Joel C.
Why does the rand() generally returns 41 as its output everytime first when it is called?
rand
2 Votos
6 Respostas
2nd Jun 2019, 3:37 PM
Bhavya Sri Khandrika
Why each time I run this code it's the same result using rand() function?
c
random
1 Voto
3 Respostas
17th Sep 2019, 7:22 AM
Hadjer
Is srand() neccessary because rand() will display random no. without srand()??????
c++
rand
0 Voto
2 Respostas
28th Oct 2016, 8:50 AM
koustav
How to set the range for generating random numbers in C using rand() function?
c
1 Voto
4 Respostas
2nd Aug 2018, 5:45 AM
Yash 💎
Can i use rand() to find names within a specified range?
c++
rand
0 Voto
1 Resposta
7th Aug 2016, 12:29 PM
Asomaning Enock
why the percentage of even and odd numbers generated by rand() is the same every time?
c++
rand()
0 Voto
6 Respostas
14th Jul 2019, 6:51 PM
MdChy
How to produce a random vehicle number (i.e RJ14CG3894) using rand() function ?
0 Voto
3 Respostas
12th Oct 2017, 9:24 AM
BHUWAN CHANDNA
Write a program in C that uses the rand() function to create 1000 structs
c#
data-types
linkedlist
print
programming
rand
structs
stuct
1 Voto
1 Resposta
7th Apr 2018, 3:50 PM
Martin Toomey
How can i calculate runtime of the function in php like rand() & mt_rand()?
calculate
function
in
of
php
runtime
the
1 Voto
2 Respostas
18th May 2018, 10:25 PM
Ahad Bayat
Any doubt? Clear all your confusion about rand() & srand() in the answers of this question.
c++
rand
0 Voto
7 Respostas
19th Jul 2017, 2:17 PM
Arnab Bhaumik
C zero rand error
c
in
rand()
2 Votos
12 Respostas
31st Dec 2018, 7:14 AM
Vladimir Semenov
Random Number Generator prob
c++
rand()
2 Votos
2 Respostas
11th Sep 2017, 12:57 PM
jayrn02
Hey i can have general syntax for rand() function and anything else related to picking random numbers
c++
loops
0 Voto
5 Respostas
27th Nov 2017, 2:02 PM
Gplayer
What's wrong with my code?
c++
cpp
password
rand()
random
0 Voto
9 Respostas
4th Sep 2023, 7:21 PM
Tanvesh Kaviskar
Why 1 is added with (rand()%range) ? And why do we use module % between rand() and range ?
cpp
1 Voto
2 Respostas
3rd Jul 2022, 12:11 PM
Aftab Qureshi
Can someone explain to me how the rand() work ? Language C++ . I don’t get it ! What do we use it for ?
beginner
c++
help
rand
rand()
4 Votos
4 Respostas
16th Aug 2018, 1:13 AM
Abir Arsalane
could someone explain me why it's not working ?
c++
rand()
srand()
3 Votos
2 Respostas
21st Apr 2017, 2:23 PM
MKey
What is the Difference between header files like cmath cstdlib and math.h stdlib.h
c++
header_files
rand()
0 Voto
3 Respostas
23rd Jan 2019, 12:58 PM
Teddy
Почему в практике по функции rand() в условии нужный диапазон от 0 до N, а правильным считается решение с диапазоном от 1 до N?
problem
2 Votos
4 Respostas
25th Apr 2022, 2:11 PM
Сергей Дьяченко
Can someone tell me what's my mistake here? c++
c++
rand()
switch
0 Voto
2 Respostas
3rd Jan 2019, 10:09 AM
Platinoob_
Random number generator was not discussed in the java course and little was API taught. Though rand() was discussed in c++ .Why?
java
0 Voto
5 Respostas
26th Mar 2018, 6:39 PM
Adejorin Abel
When we use rand() in random, why do we always get 41 as the filing output while it should vary with every outcome?
rand
0 Voto
7 Respostas
6th Jan 2018, 3:49 PM
Mohit M Gulecha
What to add in rand() function so that each random no will pop up the screen only once during execution
c++
rand
1 Voto
2 Respostas
16th Apr 2017, 9:43 AM
Tanmay Shimpi
Write program use a rand() function to produce two positive integer. Program should promt user question.How much is 6 times 7?
python3
0 Voto
1 Resposta
21st Oct 2018, 12:55 PM
Goodboy08
What is the maximum possible value of the following code
c++
function
is
rand()
what
0 Voto
6 Respostas
11th Sep 2020, 1:56 PM
Pulasani Aswini
Plz tell me what does the for loop indicates in random number program!
c++
for
rand()
random
0 Voto
4 Respostas
20th Jan 2017, 6:44 PM
sachin
srand() function with time(0) function
c++
rand()
random
truly
0 Voto
2 Respostas
4th Aug 2017, 3:39 PM
Kalliath Abdul Rasheed Shamil
While using srand() in c++, I get segfault 1 out of 10 times. Any possible solution to that?
c
c++
rand()
srand
0 Voto
1 Resposta
11th Feb 2017, 6:01 PM
Nishant Shah
srand on linux
c++
rand
rand()
srand
srand()
1 Voto
2 Respostas
2nd Jan 2017, 4:49 AM
Michael Darnell
I want to cin a random character, I tried adding stdlib.h library and used rand(), but it keeps giving me this error
c++
error
library
rand()
random
stdlib.h
0 Voto
2 Respostas
26th Nov 2019, 6:27 PM
Zohal
Issue generating ASCII characters
array
ascii
c
char
programming
rand()
string
0 Voto
2 Respostas
17th Jan 2019, 9:45 AM
zhoolf
Faça uma pergunta
Faça uma pergunta
Faça uma pergunta
Faça uma pergunta
< Anterior
1
2
3
Próximo >
Quente hoje
What's the best way to learn anything
1 Votes
How can I improve my Authenticator App built with HTML, CSS, and JavaScript?
0 Votes
Most asked!
1 Votes
Malloc vs calloc | memory not initialized
1 Votes
help!
0 Votes
Is react js enough for frontend??
0 Votes
Mini project ideas for final years
0 Votes
Please guys could smw do this for me ?
0 Votes