Here is the output from my compiler:
There is something wrong with the declaration of the remove function.Code:|8|error: conflicting types for ‘remove’| /usr/include/stdio.h|179|note: previous declaration of ‘remove’ was here| ||In function ‘main’:| |32|warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘double’ [-Wformat]| ||=== Build finished: 2 errors, 1 warnings ===|
I also noticed that when you call the functions(including remove), that you pass the float(x) as the last argument, yet in the function headings, you declare float as the first parameter. The order in which the arguments are passed to the function must be in the order that the parameters are declared in the prototype.
So if you have:
Then calling the function should look like:Code:int remove (float x, int p, int n, int d, int q)
Code:remove(x, pennies, nickels, dimes, quarters); // your code has x as the last argument, instead of first