Home TechnologyProgramming Subscribe to RSS

How To Write A C Program Which Converts Binary No. Into Hexadecimal No.?

Answer Question

1 Answer - Sort by: Date | Rating

    Write a complete C program that will calculate and print bills for the city power company. The rates vary depending on whether the use is residential, commercial, or industrial. A code of R means residential use, a code of C means commercial use, and a code of I means industrial use. Any other code should be treated as an error.

    The rates are computed as follows:

    R: $6.00 plus $0.052 per kwh used
    C: $60.00 for the first 1000 kwh and $0.045 for each additional kwh
      I: Rate varies depending on time of usage:

    Peak Hours: $76.00 for first 1000 kwh and $0.065 for each additional kwh
    Off-peak Hours: $40.00 for first 1000 kwh and $0.028 for each additional kwh.

    Your program should prompt the user to enter an integer account number, the use code (type char), and the necessary computation figures in whole numbers of kilowatt-hours (kwh). Your program should display the amount due from the user.
    0 0
    Guest

    Guest 

    answered 8 months ago

      More

         
         

        Ask a Question via Twitter

        Send a question to @askblurtit and we will publish it online and send you a reply everytime you receive an answer.

        Blurtit Store

        Get T-shirts, hoodies, caps and more at the Blurtit store

        Blurtit International