Here's the snippet of code that I'm having problems with:
Code:
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 = 30 + (totalwater/1000 * .55);
amountowed = totalbill;
I keep getting this warning "conversion from double to float, possible loss of data" for this line
totalbill = 30 + (totalwater/1000 * .55);
I dont understand what it could mean, everything is declared as float ( I, obviously, made sure of that), if anyone has any idea what's wrong with this line I would really appreciate it if ya could share it with me.
Thank you very much.