Rand() % 14 only generates the values 6 or 13
问题 Whenever I run the following program the returned values are always 6 or 13. #include <iostream> #include <fstream> #include <ctime> #include <cstdlib> using namespace std; //void randomLegs(); //void randomPush(); //void randomPull(); //void randomMisc(); int main(int argc, const char * argv[]) { srand(time(NULL)); //randomLegs(); cout << rand() % 14; return 0; } I have run the program close to a hundred times during today and yesterday. Can anyone tell me what I'm doing wrong? Thank you.