Pretty stumped on why I am getting so many errors trying to get this to work, the reason terminalArray is not declared is because this is a function, terminalArray was declared before main. Any help will be greatly appreciated!
int histArray[10];
int i;
int j;
while (terminalArray >= 1 && terminalArray < 99)
if (terminalArray >= 1 && terminalArray < 9;)
{histArray[0]++};
else if (terminalArray >= 10 && terminalArray < 19;)
{histArray[1]++};
else if (terminalArray >= 20 && terminalArray < 29;)
{histArray[2]++};
else if (terminalArray >= 30 && terminalArray < 39;)
{histArray[3]++};
else if (terminalArray >= 40 && terminalArray < 49;)
{histArray[4]++};
else if (terminalArray >= 50 && terminalArray < 59;)
{histArray[5]++};
else if (terminalArray >= 60 && terminalArray < 69;)
{histArray[6]++};
else if (terminalArray >= 70 && terminalArray < 79;)
{histArray[7]++};
else if (terminalArray >= 80 && terminalArray < 89;)
{histArray[8]++};
else if (terminalArray >= 90 && terminalArray < 99;)
{histArray[9]++};
cout << "1-9: ";
for (j = 0; j < histArray[0]; j++)
{
cout << "*" << endl;
}
cout << "10-19: ";
for (j = 0; j < histArray[1]; j++)
{
cout << "*" << endl;
}
cout << "20-29: ";
for (j = 0; j < histArray[2]; j++)
{
cout << "*" << endl;
}
cout << "30-39: ";
for (j = 0; j < histArray[3]; j++)
{
cout << "*" << endl;
}
cout << "40-49: ";
for (j = 0; j < histArray[4]; j++)
{
cout << "*" << endl;
}
cout << "50-59: ";
for (j = 0; j < histArray[5]; j++)
{
cout << "*" << endl;
}
cout << "60-69: ";
for (j = 0; j < histArray[6]; j++)
{
cout << "*" << endl;
}
cout << "70-79: ";
for (j = 0; j < histArray[7]; j++)
{
cout << "*" << endl;
}
cout << "80-89: ";
for (j = 0; j < histArray[8]; j++)
{
cout << "*" << endl;
}
cout << "90-99: ";
for (j = 0; j < histArray[9]; j++)
{
cout << "*" << endl;
}
return 0;