Log in

View Full Version : changing something like 654321 to 654k



zluo
06-25-2012, 09:57 AM
title says all. is it possible for something change
writeln('654321') to writeln('654k')
also would it be possible to add a comma between a number, like
writeln('654,321')? thanks for answers, tidying up a progress report

riwu
06-25-2012, 10:03 AM
writeln(654321/1000+'k');

For the latter, its going to involve some math (div etc)

zluo
06-25-2012, 10:06 AM
ty, didnt realize you could do math in simba

Runescape Pro
06-25-2012, 12:15 PM
Writeln(IntToStr(number or variable name/1000)+'K');