Basically the program intakes two numbers and subtracts them. The reimbursement($) would then be multiplied by .35
printf("Enter beginning odometer reading")
printf("Enter ending odometer reading")
double diff= OD2-OD1;
double reimbursement= rate*diff
print("You traveled %lf amount of miles At $.35 per mile, your reimbursement is %lf",diff,reimbursement)
The program works if i enter whole numbers/integers. But as soon as i put in a decimal it crashes and it doesn't work.
Why is that? I have doubles declared. I have %lf in the scanf function..