Having a hard time to understand srand and why we need to change the seed. Now it's clear. Thank you!
@leythecg Жыл бұрын
Once again brought to the point without much fuss! Thank you very much! 👍👍👍
@ProfessorHankStalica Жыл бұрын
Glad it was helpful!
@abel13408 ай бұрын
@@ProfessorHankStalica thank you professor!on point! like the hat!
@officialdanieldsouza4 ай бұрын
Excellent tutorial! I tried to understand the same concept through reading some blog articles online but didn't fully grasp the concepts that you discussed in clear, simple level of understanding in this video. Thanks again!!
@ProfessorHankStalica3 ай бұрын
Glad it was helpful!
@duttybwoy5565 ай бұрын
Very good , clear and simple explanation !!! good job... I also saw this line srand(time(NULL)); on top of the main function for this to not generate the same number all the time
@pelecaj706710 ай бұрын
short and to the point. thanks
@HarisAbdullah-p6tАй бұрын
Sir, Thank you so much. It helped a lot. Lots of love and thanks from Pakistan.
@safa-uc1mk Жыл бұрын
Thank you mister! That was a really crisp explanation 🙌
@ProfessorHankStalica Жыл бұрын
Glad you liked it!!
@EbyHamady-ul7rc10 ай бұрын
It was a really excellent and calm explanation, thank you
@ProfessorHankStalica10 ай бұрын
You're very welcome!
@ExamYou-q3iАй бұрын
wow !!!! like i couldnt even understand it from chat gpt!!!!! but you made it look so easy like a sittng duck. thank you sooo much
@ProfessorHankStalicaАй бұрын
The funny thing about ChatGPT is that it's wrong. A lot. Don't depend on it for school work. 1. It's cheating. 2. You won't learn anything. 3. It's wrong a lot.
@carljohncafe69217 ай бұрын
Thank you so much! This video is a life saver.
@lydianne8013 Жыл бұрын
Thank u so much i have an exam tomorrow and i don't understand this function . U save me ❤❤
@ProfessorHankStalica Жыл бұрын
Good luck!
@ZorikaSakamishi4 ай бұрын
Thanks sir i appreciate your work
@ProfessorHankStalica3 ай бұрын
Thanks and welcome
@sianwa116 ай бұрын
Thanks for the clear explanation
@ProfessorHankStalica6 ай бұрын
Happy to help
@andrewbooher17099 ай бұрын
How would you go about reading a user input in the range of numbers? For example, if you wanted them to pick a number 1 - 10. How could you make it so it reads if they picked within that range?
@brigadut4 күн бұрын
int x = time(NULL); srand(x); int range = 100; int randomNumber = (rand() + 1) % range; std::cout
@luisochoa528212 күн бұрын
My guy is saving lives without knowing it
@23Devvrat7 ай бұрын
great video man ! cheers
@jchdbtcmdddhuryy63325 ай бұрын
Thank so much ❤
@ProfessorHankStalica5 ай бұрын
You're welcome 😊
@Wagonik Жыл бұрын
thx! very useful
@ProfessorHankStalica Жыл бұрын
Glad it helped!
@omarmohammed99389 ай бұрын
So if I wanted to generate random number from 0 to 12 Then i do this right? Cout
@ProfessorHankStalica9 ай бұрын
Close. rand() % 13 because of how modulus works. If you divide any number by 13 by, the remainder will be any integer from 0 - 12.
@yooniecardbtsclips11 ай бұрын
Thankssss
@ProfessorHankStalica11 ай бұрын
You are welcome.
@youssefkawtharani2536 Жыл бұрын
What if i want the user to enter a random number and the program should tell true or false?
You look charismatic, however can pull off the goofiest face in the party at anytime.
@ProfessorHankStalica11 ай бұрын
Now, if only the ladies thought so, I'd be in business... 👍🤣😂
@M7medKasem11 ай бұрын
@@ProfessorHankStalica you're the cool professor in college for sure 🫶🫶😂
@ProfessorHankStalica11 ай бұрын
@@M7medKasem Well, far be it from me to argue with someone with such obvious intelligence!
@Aarpod9 ай бұрын
You shoulda wrote the textbook im using for class right now. I don’t know how the author is gonna just drop rand/srand in an example program without context and be like: “Edit the program so it displays 1-10” Like nah thats not how it works chief