Everytime I run this program, that is supposed to display a random number between 0 and 20, it outputs 20. I would really appreciate if somebody could point out were I'm going wrong.
Code:#include <iostream.h> #include <cstdlib.h> using namespace std; int main() { int mynumber = rand() % 10 + 20; cout << mynumber; cin.get(); }