double gallons = (beginningMeterValue - endinggMeterValue)/10;
    double residential == (15.00 + 0.0005(gallons));
    double commercial == (1000.00 + 0.00002(gallons));

它说每一行都缺少一个“;”

最佳答案

您为变量分配值的double residential == (15.00 + 0.0005(gallons));,只需要一个等号。另外,我不认为0.0005(gallons)有效,如果您想将此乘以(15.00 + (0.0005 * gallons))

09-11 18:50