I'm a beginner in c++ and i have been given a project to do in c++. It may look easy to a person that has been doing this for a long time but I am still learning.
I have to create a two dimensional array with random numbers from 0 to 20, i should first print the numbers in the array on the screen and then find the sum of all of them. Also i should use the srand function with #include <time.h>.
Can i have you guys' help. Thanks in advance!
the srand() function will randomize the seed (seed-randomize). This operation will make the numbers generated by rand() more random.
When you're debugging, you may not want to call "srand()". Doing so will make every execution give you the exact same random numbers.
(so if you find some errors, without srand you can replicate the same situation, while with srand numbers will change and the error may not occur again)