I'm continuing to work on this water billproject of mine and its going well but I think my calculation is wrong. Here's the code:
No matter what numbers I input I get 0.0000 for the totalbill, once again I'm at a loss as to why.Code:#include <stdio.h> int main() { int customernumber; float waterlevel; float previouslevel; float totalwater; float totalbill; float amountowed; printf("Enter customer number\n" ); scanf( "%d" , &customernumber ); printf("Enter current water level\n" ); scanf("%f" , &waterlevel ); printf("Enter previous water level\n" ); scanf("%f", &previouslevel ); totalwater = waterlevel - previouslevel; totalbill = totalwater/1000 * .55f; printf("The total bill is %f\n", &amountowed );
Any feedback is more then appreciated,
thank you so much.
-Extro
Edit: Sorry I forgot to post the final line of code.