I know that im not supposed to write like this but i just want to know how to sort 4 random chosen numbers (chosen by pc) in ascending order. Just the basic insert. Imstill abeginnerand cant use arrays!
You don't know how to use arrays, or you aren't allowed to use arrays? There is a big difference, and the answer drastically changes the required algorithm(s). Someone might help you if you answer that, and take some time to think about your algorithm.
using namespace std;
int argc, char* argv)
cout << "How many times would you like to roll the dice?" << endl;
cin >> numRolls;
for (int k = 0; k < 6; k++)
arrRolls[k] = 0;
for (int i = 1; i <= numRolls; i++)
dieRoll = DICE_ROLL();
cout << "Die Roll " << i << ": " << dieRoll << endl;
arrRolls[dieRoll - 1]++;
for (int j = 0; j < 6; j++)
cout << "The number " << j + 1 << " was rolled " << arrRolls[j] << " times." << endl;
result = (rand() % 6) + 1;
by WaltP: Added CODE tags -- with all the help about them, how could you miss using them????