Seriously? Do your own homework. Or at least try, and give us code to work with. Don't know C, but this should be VERY simple - create an input box for the customer, have the customer input a value (or, if you have a list of customers with each customers' power consumption, loop through the list), get the value, assign the correct impact point on the three, and calculate based on that. However - the assignment is VERY dubious - the math, that is. The table says that a consumption BETWEEN 401 and 600 is charged by Tk 230 - but that anything ABOVE 600 is charged by 0,80 for each - the example provided makes no sense, since it assumes that 0,80 is charged for everything above 400 (it seems) - hence, the math doesn't make sense.