#include int main() { double consumption; double bill = 0.0; printf("Enter consumption: "); scanf("%lf", &consumption); if (consumption <= 100) { bill = 0.01 * consumption; } else if (consumption <= 300) { bill = 1 + 0.03 * (consumption - 100); } else if (consumption <= 800) { bill = 1 + 6 + 0.05 * (consumption - 300); } else { bill = 1 + 6 + 25 + 0.07 * (consumption - 800); } printf("Bill = %lf\n", bill); }