this is my code and I'm not sure why I'm getting an error whenever I try to test it. It keeps saying return value ignored with scanf
#include <stdio.h>
#include <math.h>
int main(void) {
float money, tax, result;
printf("Enter the amount of money.");
scanf("%f", &money);
tax = 0.05 * money;
result = tax + money;
printf("With tax added: $%f", result);
return 0;
}
abcinstead of a number when prompted, and see what happens next. That's one error case that checking the return value ofscanfwould catch.