Convert String to number, calc, round and convert back

Hey all. I got the following number in string;

“42197”

I need to convert it to int, then divide per 60000, like;

42197/60000

The result will be smth like 0,7032833333333333. I need to get only 7032833333333333 and convert that back to string.

Could anyone help me?

Tnx.

What have you tried and where do you get stuck? This sounds like a homework exercise so the best thing to do is show us what you have and we can help with suggested next steps.

I agree that this sounds like homework and some code would be good to see where exactly you get stuck. https://godoc.org/strconv is probably what you’re looking for

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.