|
From: Robert D B. <lon...@ju...> - 2001-02-13 18:17:08
|
Try this: #include <cstdlib> #include <ctime> using std::srand; using std::rand; num = rand()/(RAND_MAX/12); // 0-12 num++; // to eliminate zero. you can add the ++ to the above num = Regards, lstar36 On Tue, 13 Feb 2001 11:16:44 -0500 Jose Flores <jf...@ax...> writes: > what is a good simple command to get a random number from 1 to 13? I > keep > getting the run around when I ask this question... > Thanks > Jose > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |