# How do I Show 1155 to 1.1K

Get help using Construct 2

### » Tue Jun 13, 2017 10:03 am

Hello guys, how are you?
I try to show 1K, 1.1K etc etc but i think i miss something.

I use this:

Variable = 1155

round(variable/1000) & "K"
and the result is:
1K

I use this:
float(variable/1000) & "K"
and the result is:
1.155K

I want to remove "55" (in this example), means the 2 last numbers each time.
Can you help me? Thanks!
B
66
S
39
G
19
Posts: 252
Reputation: 15,935

### » Tue Jun 13, 2017 4:45 pm

answer = round(variable / 10^2) * 10^2

or generically:

answer = round(variable / 10^places) * 10^places
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,867

### » Tue Jun 13, 2017 6:52 pm

@gumshoe2029

I test it with 1115 (variable) and gives me result: 1100

round(variable / 10^2) * 10^2
B
66
S
39
G
19
Posts: 252
Reputation: 15,935

### » Tue Jun 13, 2017 8:47 pm

Just divide by 1000 again.
(int(1155 / 10^2) * 10^2)/1000 & "K"
B
71
S
22
G
287
Posts: 3,858
Reputation: 157,922

### » Tue Jun 13, 2017 8:57 pm

This is probably overkill but here's something I did back then : https://www.dropbox.com/s/ry1ry2wbxmycd ... .capx?dl=0
B
81
S
33
G
27
Posts: 1,029
Reputation: 21,143

### » Tue Jun 13, 2017 10:11 pm

@blackhornet
Thank you!

@Magistross
Awesome, Thanks!
B
66
S
39
G
19
Posts: 252
Reputation: 15,935