2 Attachment(s)
Compile error? Logic error? Syntax Error? Please help
Can anyone please explain to me why this program won't correctly print the proper totals on screen? See my code and the included screenshot.
Code:
#include <stdio.h>
int main(void)
{
int total, first, second;
printf("Enter 2 numbers: \n\n");
scanf_s("%d%d", &first, &second);
total = first + second;
printf("%d+%d=%d\n\n", first, second, total);
total = first * second;
printf("%d*%d=%d\n\n", &first, &second, &total);
total = first - second;
printf("%d-%d=%d\n\n", &first, &second, &total);
total = first / second;
printf("%d/%d=%d\n\n", &first, &second, &total);
total = first % second;
printf("%d%%d=%d\n\n", &first, &second, &total);
}
Attachment 13712Attachment 13711