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!!
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
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.
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?
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
Having a hard time to understand srand and why we need to change the seed. Now it's clear. Thank you!
Once again brought to the point without much fuss! Thank you very much! 👍👍👍
Glad it was helpful!
@@ProfessorHankStalica thank you professor!on point! like the hat!
short and to the point. thanks
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!!
Glad it was helpful!
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
Thank you mister! That was a really crisp explanation 🙌
Glad you liked it!!
It was a really excellent and calm explanation, thank you
You're very welcome!
Sir, Thank you so much.
It helped a lot.
Lots of love and thanks from Pakistan.
Thank you so much! This video is a life saver.
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
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.
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?
Thank u so much i have an exam tomorrow and i don't understand this function . U save me ❤❤
Good luck!
Thanks sir i appreciate your work
Thanks and welcome
Thanks for the clear explanation
Happy to help
great video man ! cheers
My guy is saving lives without knowing it
Thank so much ❤
You're welcome 😊
damn good video bro
Is it possible to save the numbers and then calculate with them or something?
Sure. Place them in a variable and then use the number for whatever you need it for.
So if I wanted to generate random number from 0 to 12
Then i do this right?
Cout
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.
int x = time(NULL);
srand(x);
int range = 100;
int randomNumber = (rand() + 1) % range;
std::cout
That's about it.
thx! very useful
Glad it helped!
What if i want the user to enter a random number and the program should tell true or false?
if(userEnteredNumber == randomNumberGenerated)
cout
"cstidlib"
I laughed
You look charismatic, however can pull off the goofiest face in the party at anytime.
Now, if only the ladies thought so, I'd be in business... 👍🤣😂
@@ProfessorHankStalica you're the cool professor in college for sure 🫶🫶😂
@@M7medKasem Well, far be it from me to argue with someone with such obvious intelligence!
Thankssss
You are welcome.
Thanks , your voice is a little low
I'll work on that in future videos. Thanks.
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