0
Minutes into Minutes and Seconds c#
Eg 180.2 minutes into 180 minutes and 12 seconds in C#
3 ответов
+ 2
I would make a Programm which Takes away the minutes also here 180 minutes, so that we only have 0.2.
The Formular then would be 2*6= 12
String[] num = 180.2.Split('.');
nun[1] = (Int.Parse(num[1])*6).ToString();
Roughly written but I think you got the conzept. 😉
+ 2
Truncate or convert to integer to get minutes (180). Subtract that integer from the original value (180.2 - 180) = 0.2 and multiply by 60 to convert into seconds (0.2)*60 = 12.
180 minutes and 12 seconds
+ 2
Thank you, I managed to do it now