An electricity board charges the following rates to domestic users:- For the first 100 units – 40p/unit For the next 200 units – 50p/unit Beyond 300 units – 60p/unit. Write a program to read the names of users and number of units consumed and print out the charges with names. Use the concepts of classes.
Comments
Leave a comment