Is this the correct way to use scanf. And is there a more efficient way or is there another way that uses less memory. I know this is a very simple example but i'm just starting out. I want to learn to write correct, effiecient and portable code. BTW I am using Dev 4.0. Thanks for your input.
int a = 0, b = 0;
scanf("%d %d", &a, &b);
printf("The numbers are %d and %d.\nThe sum is %d.\nThe differenceis %d.\nThe product is %d.\n\n", a, b, a + b, abs(a - b), abs(a * b));