hey all, so im making one that uses pointers to pass the answers of four calculations. im just missing something here, i go to compile it and it freezes and closes the program. thanks for the help.

Code:#include <stdio.h> #include <stdlib.h> void calculation(double, double, double *, double *, double *, float *); int main() { double num1, num2; double *sum, *sub, *prod; float *div; float div_answer = 0; double sum_answer = 0; double sub_answer = 0; double prod_answer = 0; *sum = sum_answer; *sub = sub_answer; *div = div_answer; *prod = prod_answer; printf("Please enter two numbers:"); scanf("%f %f",&num1, &num2); calculation (num1, num2, &sum_answer, &sub_answer, &prod_answer, &div_answer); printf("%d + %d = %d\n", num1, num2, sum_answer); printf("%d - %d = %d\n", num1, num2, sub_answer); printf("%d * %d = %d\n", num1, num2, prod_answer); printf("%d / %d = %f\n", num1, num2, div_answer); system("PAUSE"); return 0; } void calculation (double num1, double num2, double *sum, double *sub, double *prod, float *div) { *sum = num1 + num2; *sub = num1 - num2; *prod = num1 * num2; *div = num1 / num2; }