get rid of the extraneous comma in your declaration, so instead of
void arrange(int array[],);
use
void arrange(int array[]);
Define the function and put the block you want in the function body.
You can either make your declaration into a definition, or define it elsewhere.
So, you could change line 7 to:
1 2 3
|
void arrange(int array[])
{
}
|
or add it afterwards so you have line 7:
[code]void arrange(int array[]);
[/code]
and line 41:
1 2 3
|
void arrange(int array[])
{
}
|
Place the indicated block in your function body, remembering to initialise the local variables:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
void arrange(int array[])
for (int i = 0; i < 10; i++)
{
for (int j = i + 1; j < 10; j++)
{
if (array[i]>array[j])
{
temp = array[i];
array[i] = array[j];
array[j] = temp;
}
}
}
}
|
Call it in main - line 21, like so:
arrange(array);
The array isn't passed by value, so the array you have in main() is what get's modified and you can pass it to your second function as well for display.