I need help with my hw. Its due tomorrow and what i have doesnt seem to work :/

This is the problem:

The electric company charges according to the following rate schedule:

9 cents per kilowatt-hour (kwh) for the first 300 kwh

8 cents per kwh for the next 300 kwh (up to 600 kwh)

6 cents per kwh for the next 400 kwh (up to 1,000 kwh)

5 cents per kwh for all electricity used over 1,000 kwh.

Write a function to compute and return the total charge for each customer. Write a main function to call the charge calculation function using the following data:

Customer Number Kilowatt-hours used

123 725

205 115

464 600

596 327

601 915

613 1,011

722 47

The program should print a three-column chart listing the customer number, the kilowatt-hours used, and the charge for each customer. The program should also compute and print the number of customers, the total kilowatt-hours used, and the total charges.

and this is what i have so far :

Code:#include <stdio.h> int main (void) { int custnum; int kwh; double totalo; double totald; double totalt; double totalf; double finaltotal; printf("\nCustomer Number or Enter -1 to quit>"); scanf("%d", &custnum); if (custnum == -1) break; if(custnum >= 0) printf("\nEnter the number of kwh used"); scanf("%d", &kwh); if (kwh <= 300) totalo = 0.9 * kwh; if(kwh >300 && kwh <= 600) totald = 0.8 * kwh ; if(kwh > 600 && kwh <= 1000) totalt = 0.6 * kwh if(kwh >1000) totalf = 0.5 * kwh; finaltotal = totalo + totald + totalt+ totalf