okay so lets say
k so now we know i its going to be 40(lol) + a random number between 0 and 40Code:int lol = 40; int i = lol + rand()%40;
but how could i accomplish that i could be any number between 0 and 40 o.o? help please.
This is a discussion on Help im a noob within the C++ Programming forums, part of the General Programming Boards category; okay so lets say Code: int lol = 40; int i = lol + rand()%40; k so now we know ...
okay so lets say
k so now we know i its going to be 40(lol) + a random number between 0 and 40Code:int lol = 40; int i = lol + rand()%40;
but how could i accomplish that i could be any number between 0 and 40 o.o? help please.
You haven't yet written clearly what your program is supposed to do.
Until you do that, you'll not get a definite answer, only guesses.
If you just need to list all the numbers from 1 to 40, use a loop.