Why does printf give me this result ^*C?

Hey, I'm just doing a tutorial and I'm wondering why its not working.
I need the user to enter two numbers in to an array and then take one away from the other!


int main(void) {
int numbers[2], result;
printf("Enter two numbers:");
scanf("%2s", &numbers[2]);
result = numbers[0] - numbers[1];
printf("%2s", result);

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion