Ok so I need to convert from whole hours and minutest to decimal form and I am using this:
time = hours + (minutes / 60) , however whenever I put this in I get this huge negative number, can anyone tell me why this is ????
Printable View
Ok so I need to convert from whole hours and minutest to decimal form and I am using this:
time = hours + (minutes / 60) , however whenever I put this in I get this huge negative number, can anyone tell me why this is ????
Can you show us a bit more code? It sounds like one of the variables being used to calculate time may be incorrect.
and what are the values of hours and minutes? Did you set them to something or just leave them contain whatever junk happens to be on the stack at the time?
what data type is time? you should really use a different variable name because time is the name of a function defined in time.h.
can u give an example of the type of output u want?
it's not so clear of what u want..and y are u dividing minute by 60?
i think ur formula is not good, but post the outputs so that we can know what u really want.