Are you sure for(int i =0; i > number; i++) is what you mean?
So long as number is greater than 0, the execution will never enter the for loop.
If number is less than 0, the execution will never leave the for loop.
This is probably overkill for the given code but it would generalize nicely for other situations. Instead of creating 13 ints (the array and a counter for each number), why not use the index of the array to signify the number, and the value stored to signify the count?
Ex:
1 2 3 4 5 6
int counts[6] = 0;
cin >> number;
for(unsignedint i = 0; i < number; i++) {
counts[rand() % 6]++;
}
This will also reduce the number of times rand() is called (each time returning a different number) from 6 times per iteration to once per iteration, as well as eliminating all conditionals. You could also do this by just creating a variable to store the random number instead of calling it so many times, which would also make the loop more efficient as each iteration would guarantee a <number>++ statement would be executed.
Many instructors don't know that either, or choose to ignore it.
A couple of articles why using the C-library random functions is not a good idea:
http://www.gztscf.com/0716/c-srand-does-not-give-same-sequences-of-random-numbers/
Your instructors are IMO unwilling to learn current C++ standards or are idiots. Even the C Standard recommends to NOT use srand() and rand(), they are unreliable and buggy.
Read my second link for details why using the C-library random functions is a bad idea.
http://cpp.indi.frih.net/blog/2014/12/the-bell-has-tolled-for-rand/
One of the reasons why you consider my source hard to read is you have not been exposed to the C++ random library. That is only going to hurt you later on.
Trying to win a Formula One race with a Ford Model-T is not likely.