I need to write a program that accepts an integer n, where n is the number of elements going into the array. Have the user input n, integers. Have a function that ouputs the current array. And have another function that bubblesorts the array. Then have the output function, output the sorted array.
I have written this code thus far, however. When compiled and run, it will ask for n, but there will be a blank line as if asking for something else, then it will run the loop, but for the %d integers in the print line, it'll have some bogus number "2293212" and then only accept 3 inputs and then crash.
Any help would be greatly appreciated, thanks.