Cursos
Cursos
Compilador de Código
Compilador de Código
Debatir
Teams
Iniciar sesión
Registrarse
Menu
Sesiones de PyR
Buscar
Buscar
Haz una pregunta
Haz una pregunta
Why does rand() keep giving me same number?
beginner
c++
conio.h()
rand()
random()
-1 Voto
2 Respuestas
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 Respuestas
27th Mar 2017, 8:34 AM
Hemant Khorwal
where to use rand() and random() in C
c
c++
0 Votos
2 Respuestas
8th Jul 2016, 12:56 PM
Manthan Patil
Why rand() value is fixed after running code once????
c++
rand()
random_value
0 Votos
2 Respuestas
4th Mar 2019, 12:09 PM
김준석
Explain random no generators , srand(), rand() etc?
c++
0 Votos
1 Respuesta
9th Dec 2016, 10:47 AM
Morpheus
What is the difference between rand() and srand()??? please clarify...
c++
rand
3 Votos
3 Respuestas
31st Jan 2016, 7:58 AM
RAVI KUMAR G
can anybody specify default seed value for rand() function??
c++
rand
0 Votos
3 Respuestas
3rd Oct 2016, 3:15 PM
HARiSH
When can we use the rand() function and how ?!
cpp
1 Voto
4 Respuestas
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 Respuestas
24th Aug 2019, 5:41 AM
Vaidehi Chotaliya
What is the difference between srand() and rand() function?
rand
0 Votos
2 Respuestas
4th Mar 2018, 6:28 PM
Ipshita Pal
How strings are randomly choose using rand() in c or c++ ?
c
c++
2 Votos
6 Respuestas
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 Respuestas
19th Sep 2017, 10:49 PM
Oleksandr Rubtsov
How rand() function works in a program.Pease explain anyone
arguments
c++
comments
function
rand()
0 Votos
2 Respuestas
28th Nov 2017, 4:29 PM
Suraj Satankar
so naturally rand() % X goes from 0 -> X-1?
c++
rand
0 Votos
3 Respuestas
14th Oct 2016, 5:22 AM
lucas
How to use rand() function without comming same value in c++
rand
1 Voto
3 Respuestas
25th Feb 2018, 4:25 PM
Vibeeshanan Vibee
Please explain me the rand() and srand() function in c++?
coder
0 Votos
2 Respuestas
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 Respuestas
24th Sep 2017, 1:21 PM
SANJEET KUMAR
What is the difference bwtween srand() and rand() functions in C++
c++
rand
0 Votos
3 Respuestas
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 Respuestas
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 Respuestas
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 Respuestas
17th Sep 2019, 7:22 AM
Hadjer
Is srand() neccessary because rand() will display random no. without srand()??????
c++
rand
0 Votos
2 Respuestas
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 Respuestas
2nd Aug 2018, 5:45 AM
Yash 💎
Can i use rand() to find names within a specified range?
c++
rand
0 Votos
1 Respuesta
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 Votos
6 Respuestas
14th Jul 2019, 6:51 PM
MdChy
How to produce a random vehicle number (i.e RJ14CG3894) using rand() function ?
0 Votos
3 Respuestas
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 Respuesta
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 Respuestas
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 Votos
7 Respuestas
19th Jul 2017, 2:17 PM
Arnab Bhaumik
C zero rand error
c
in
rand()
2 Votos
12 Respuestas
31st Dec 2018, 7:14 AM
Vladimir Semenov
Random Number Generator prob
c++
rand()
2 Votos
2 Respuestas
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 Votos
5 Respuestas
27th Nov 2017, 2:02 PM
Gplayer
What's wrong with my code?
c++
cpp
password
rand()
random
0 Votos
9 Respuestas
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 Respuestas
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 Respuestas
16th Aug 2018, 1:13 AM
Abir Arsalane
could someone explain me why it's not working ?
c++
rand()
srand()
3 Votos
2 Respuestas
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 Votos
3 Respuestas
23rd Jan 2019, 12:58 PM
Teddy
Почему в практике по функции rand() в условии нужный диапазон от 0 до N, а правильным считается решение с диапазоном от 1 до N?
problem
2 Votos
4 Respuestas
25th Apr 2022, 2:11 PM
Сергей Дьяченко
Can someone tell me what's my mistake here? c++
c++
rand()
switch
0 Votos
2 Respuestas
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 Votos
5 Respuestas
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 Votos
7 Respuestas
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 Respuestas
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 Votos
1 Respuesta
21st Oct 2018, 12:55 PM
Goodboy08
What is the maximum possible value of the following code
c++
function
is
rand()
what
0 Votos
6 Respuestas
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 Votos
4 Respuestas
20th Jan 2017, 6:44 PM
sachin
srand() function with time(0) function
c++
rand()
random
truly
0 Votos
2 Respuestas
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 Votos
1 Respuesta
11th Feb 2017, 6:01 PM
Nishant Shah
srand on linux
c++
rand
rand()
srand
srand()
1 Voto
2 Respuestas
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 Votos
2 Respuestas
26th Nov 2019, 6:27 PM
Zohal
Issue generating ASCII characters
array
ascii
c
char
programming
rand()
string
0 Votos
2 Respuestas
17th Jan 2019, 9:45 AM
zhoolf
Haz una pregunta
Haz una pregunta
Haz una pregunta
Haz una pregunta
< Anterior
1
2
3
Siguiente >
En tendencia hoy
Sticky position
3 Votes
Help please?
3 Votes
How to get better with problem-solving and programming
1 Votes
Ejercicio Pytho
0 Votes
Odd even threads without condition variable
0 Votes
Online voting system
2 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes
Bug on "Java for Beginners Module 3 Quiz"
1 Votes
SQL practice
2 Votes