Changing double time to double cost
I looked on the boards, and could not find a solution to the exericse on my book, I can't think of a way to make a programme, add a certain cost to each hour.
For example, if I had 3 hours of work done and I am charing in 0.50 a hour, how do I make the complier know it's per hour?
I mean I will post my code but it dont make much sense cause I dont know what to do in the first place.
As you can see that wont do anything, but a push in the right direction would be aperciated.
double charge = 0;
double total = 0;
charge = hours;
total += charge;