+ 1

Hi.Help Me .How can I print numbers randomly?

7th Sep 2018, 5:16 PM
Mr. Bit
Mr. Bit - avatar
3 Answers
+ 4
The C++ Course here covers that! https://www.sololearn.com/learn/CPlusPlus/1638/
7th Sep 2018, 5:59 PM
Paul Grasser
Paul Grasser - avatar
+ 3
Hi Mr. Bit, Do you mean something like this: #include <iostream> #include <ctime> #define MAXVALUE 1000 using namespace std; int main() { srand(time(NULL)); for(int i = 0; i <= 25; i++) cout << "n = " << rand() % MAXVALUE << endl; return 0; }
7th Sep 2018, 5:51 PM
Mark