You have to add the main() function that includes all the code that does the things you stated in your questions.
Will I write it for you? NO. You will learn nothing if I do that.
wah thanks ancient dragon. ^.^
A complete C program requires an entry point. The entry point is called main; you may have heard of it.
yeah i know. ^.^
The main function that you're going to add.
o..k.
I would write directly to the array (in main):
C Syntax (Toggle Plain Text)
for (i = 0; i < n; i++)
{
scanf("%d", a);
}
ok.
It depends on what you want the program to do. Perhaps you want to print the before and after to make sure the array is being sorted.
ok.
Stop the loop before the last item in the array. It's the same as i < n except one step earlier.
ok.
--
hehe~ thanks for helping me out. ^.^
though i understand quite a bit but i would figure this one out. *need to squeeze squeeze my twisted brain.* hehe~ :p