// Pantea Aria // pointers // Write a program that: // Reads two integers from the user. // write ONE function that adds AND multiplies the values and print the results in main. // Print the result in main. #include void add_product(int num1, int num2, int *prod_result, int *add_result); int main() { // Reads two integers from the user. printf ("Enter two integers:"); int num1, num2; scanf("%d %d", &num1, &num2); //write ONE function that adds AND multiplies //the values and print the results in main. int prod_result; int add_result; add_product(num1, num2, &prod_result, &add_result); printf ("Add is %d and product is %d\n", add_result, prod_result); return 0; } void add_product(int n1, int n2, int *p, int *q) { *p = n1 * n2; *q = n1 + n2; return; }