Basically the goal of this program is to have main call a function that prompts the user for two variables, then call a function that handles different calculations, and then call a function that displays back to user. The function that does the calculations, called calc, has 3 subfunctions that it calls and then retrieves data from and sends back to main.

My problem is getting calc to send it's data back to main. Specifically, I think the problem is that I don't know how to get calc to take both intOps and doubleOps and return them to main since intOps are int values and doubleOps are double values. I get this error message:

In function "calc":

warning: return makes integer from pointer without a cast

I've checked my notes, text, etc. but haven't found anything that deals with this problem. I'd greatly appreciate any help, thanks.

Code:#include <stdio.h> int getInput(void); int calc(int one, int two); int intOps(int one, int two); float doubleOps(int one, int two); int algebra(int one, int two); void display(int one, int two, int sum, double half1, double half2, int quotient, int remainder, double fraction, int algebraSolution); int main(void) { int one, two; double half1, half2, fraction; int sum, quotient, remainder; int algebraSolution; getInput(); calc(one, two); display(one, two, sum, half1, half2, quotient, remainder, fraction, algebraSolution); return 0; } int getInput(void) { int one, two; printf("\nPlease enter two integers "); scanf("%d%d", &one, &two); return one, two; } int calc(int one, int two) { intOps(one, two); doubleOps(one, two); algebra(one, two); return intOps, doubleOps, algebra; } int intOps(int one, int two) { int sum, quotient, remainder; sum = one + two; quotient = one / two; remainder = one % two; return sum, quotient, remainder; } float doubleOps(int one, int two) { double half1, half2, fraction; half1 = (double)one / 2.; half2 = (double)one / 2.; fraction = (double)one / two; return half1, half2, fraction; } int algebra(int one, int two) { int algebraSolution; algebraSolution = 2 * one + 4 * two + one * two - one / two; return algebraSolution; } void display(int one, int two, int sum, double half1, double half2, int quotient, int remainder, double fraction, int algebraSolution) { printf("\n%20s%20d", "Integer 1", one); printf("\n%20s%20d", "Integer 2", two); printf("\n%20s%20d", "Sum", sum); printf("\n%20s%20.1f", "Half of Integer 1", half1); printf("\n%20s%20.1f", "Half of Integer 2", half2); printf("\n%20s%20d", "Quotient", quotient); printf("\n%20s%20d", "Remainder", remainder); printf("\n%20s%20.4f", "Fraction", fraction); printf("\n%20s%20d", "Algebra Solution", algebraSolution); printf("\n\n"); }