I wrote a simple calulator in C, trying to teach myself the language because I'm accustomed to C++, but the program crashes once user inputs the second number for calculation. I'm wondering if there's something wrong with my code (though I can't seem to spot anything) or that Windows 7 doesn't get along with C. Can anyone tell me what's the issue is here?
The code is as follows:
Code:
#include <stdio.h>
int main(void){
int geti[3];
printf("Write something: ");
scanf("%d", geti[0]);
printf("write something else: ");
scanf("%d", geti[1]);
geti[2] = geti[0] + geti[1];
printf("Your sum is %d", geti[2]);
return 0;
}