Hi,
I have vector with time vale i.e.: 06:33.252
How to add and compute average time ?
Regards,
Fibre Optic
Hi,
I have vector with time vale i.e.: 06:33.252
How to add and compute average time ?
Regards,
Fibre Optic
Add them all up, and divide by how many you have.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
convert all the times to seconds, then do the math. for example
06:33:52 = 6 hours, 33 minues and 52 seconds
6 * 60 * 60 + 33 * 60 + 52
I think Fibre Optic knows how to do it, but not how to code it.Originally Posted by Fibre Optic
Let's see the vector.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.