Hi i need help with my hw: heres the question

2. Function with Input/Output Parameters

Write a void function called Result that has only two type int input/output parameters. The function will return the sum of the two original parameters through the first parameter. It will also return the differences of the two original parameters through the second parameter.

Write a main function to test this function.

This is what i have , ive also include the exe of the program and a sample pic



Code:
#include <math.h>

#include <stdlib.h>

#include <stdio.h>

void result(double *smp, double *lgp);

int

main(void)

{

          double num1, num2;


           /* Gets test data */

           printf("Enter the first number");

           scanf("%lf", &num1);

           printf("Enter the second number");

           scanf("%lf", &num2);

           printf("The first number is %2.f", num1);

           printf("The second number is %2.f", num2);

           system("pause");

           return (0);

           }

void

result(double *num2, double *num1)

{

             double temp;

             if (*num1 < *num2){

                       temp = *num2;

                       *num2 = *num1;

                       *num1 = temp;

             num1 = num1 + num2;

             num2 = num1 - num2;

                       

                      }}
return (0);