in order to do this without using pointers, you can't modify the variables that you are passing into the functions.
My recommendation would be to have getInput() return the integer that was input. Just call it twice, asking for one integer each time.
int getInput( void )
{
int my_input;
printf("Input a number: ");
scanf("%d",&my_input);
printf("\n");
return my_input;
}
|