Random Number Generator in C++ | rand() and srand() in C++

preview_player
Показать описание
In this lecture, we are going to discuss Random Number Generator in c++ rand() and srand() in c++
.
.

.
.
◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
🔗 Social Media 🔗
#Randomnumber #rand() #srand()
Рекомендации по теме
Комментарии
Автор

VERY IMPORTANT !
For generating random numbers between 0 and n
Use : rand()%n;
For generating random numbers between m and n where m is the lower limit and n is the upper limit
Use : rand()%(n-m+1)+m;

himankjeshwar
Автор

Best and to the point lecture. Thank you, sir

xander
Автор

why you write zero '0' in time.

AshishKumar-ddpi
Автор

loved the excitement with which you explained👍

Singh-in-CA
Автор

Finally a good wish for you buddy and thanks a lot

raunakgupta
Автор

Sir can I predict before which random number will come after compilation.

Motivation
Автор

Thanks a lot for the awesome explanation

lakshya
Автор

toh matlab agar maine agar aaj jis time pe code run kiya mai kal exact ussi time pe kal run karu toh numbers repeat honge?

animefactory
Автор

Random no. From -9 to 9 excluding 0, is this possible?

THANOSisLIVEE
Автор

Isn't cstdlib library is necessary for rand and srand functions

MuhammadAbdullah-hstf
Автор

is there any way to generate random test cases for a coding problem in c++?

rahulrawal
Автор

Ek app hai jisme outcome number random hota or algorithm wise bhi ho sakta hai usme kiya process use kiya gaya or kaise kaam karta hai apko batna hai app name 91 club ok sir...

ABHI_SHORT
Автор

I have a question. If I want to randomize between for example 1 and 5 and delete one of possibilities, how should I write it?

bartoszwlazy
Автор

please Could you wait for a second the numbers which your compiler generated are the same as what my compiler generated why is that?

suhankumarchoudhury
Автор

HOW CAN I GENERATE A MATRIX WITH ENTRIES +1 OR -1 RANDOMLY?

shubhamyadav
Автор

bhai bahot accha samjaya
aur video banaya karo na plz

codingwale
Автор

This thing help me to make tictactoe human vs pc

utkarshin
Автор

why my compiler is generating error that rand is not define?

rabiamaryam
Автор

Why is even the title in english and then you whip out the foreign language

jour
Автор

if you are speaking in english you would have generated lots of viewers

obitadeoladayo