Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
If the number is more than a million, then divide by a million and add the letter "M", otherwise if it's more than a thousand ... etc.
public string IntReduse(int score){
if (score >= 1000 && < 1000000)
return (score/1000).ToString("0.00") + "K";
else if (score >= 1000000)
return (score/1000000).ToString("0.00") + "M";
else
return score;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question