void sort(float *board, int how_many)
{
for (int j = 0; j < how_many; j++)
{
for (int i = 0; i < how_many - 1; i++)
{
if (board[i] < board[i + 1])
{
float replace = board[i];
board[i] = board[i + 1];
board[i + 1] = replace;
}
}
}
}
int main()
{
srand(time(NULL));
int how_many;
std::cout << "How many random numbers?" << std::endl;
std::cin >> how_many;
float* board = new float[how_many];
for (int i = 0; i < how_many; i++)
{
//std::cin >> board[i];
board[i] = rand() % 100 + 1;
}
sort2(board,how_many);
std::cout << std::endl;
for (int i = 0; i < how_many; i++)
{
std::cout << *board << std::endl;
board++;
}
delete[] board;
}