You should have shown some code... Useless to help elsewise... Kind of! :P
But, I made one little thing up for you, hope it helps you in the right direction!
Code:
#include <iostream>
#include <iomanip>
#include <stdio.h>
using namespace std;
//Global
int stones[10]; //10 steps, goes from 0 to 9, 10 doesnt count :P
void sortout()
{
//Order so the "Left pile stone", the index 0 (stones[0]) is the minimum value
int tempvariable;
for(int i = 0; i < 10; i++)
{
for(int j = 0; j < 10; j++)
{
if(stones[i] < stones[j]) //Stones [j] is larger than [i], switch those two
{
tempvariable = stones[i];
stones[i] = stones[j];
stones[j] = tempvariable;
}
}
}
for(int i = 0; i < 10; i++)
{
cout << "After rearrangement, lowest first: " << stones[i] << endl;
}
}
int main()
{
int ii;
for(int i = 9; i > -1; i--)
{
//Creating each 10 steps, initialized to value 9,8,7,6,5,4...
stones[i] = i;
cout << "Step " << stones[i] << endl;
}
//call sorting out, so left is stones[0], lowest pile of stones.
sortout();
return 0;
}
After you run this little program, then you can draw "stones[0]" to the left, which will have the lowest amount of piles.