ok, your single 4 digit number actually has the correct number of minutes already stated (30 in you example), however the hours need multiplying by 60.
When you divide by 100, you end up with a number, say 12.3, which is has the wrong fraction, i.e. its really should be 12.5, i.e. 12 and half hours. Therefore we need to correct this. You therefore want to calculate:
or:
double t = time/100.0; int minutes = (t-int(t))*100 + int(t)*60 return
Login