Just wondering what it is that I am doing wrong here?? It's very simple programming and I really should know this but just can't see the problem! Scanf is not reading the results of the equations into the respective positions in the array.
#include <stdio.h>
int main(void)
{
int numbers[4];
printf("Please enter 2 numbers:\n");
scanf("%d %d", &numbers[0], &numbers[1]);
printf("Your 2 numbers added are: %d\n", numbers[0] + numbers[1]);
scanf("%d", &numbers[2]);
printf("Your 2 numbers subtracted are: %d\n", numbers[0] - numbers[1]);
scanf("%d", &numbers[3]);
printf("The results of your program are: %d, %d\n", &numbers[2], &numbers[3]);
return 0;
}
numbers[2] = numbers[0] + numbers[1];?scanfis used to get input from a user not to get results from internal calculations.