[ create a new paste ] login | about

Link: http://codepad.org/tUAqr9Xj    [ raw code | output | fork ]

PHP, pasted on Sep 27:
1
2
3
4
5
6
<?php
$examples = array(1,10,100,1000,10000,12,123,2134,23452,2345234,25437648758);

foreach($examples as $n){
    echo $n." = ".number_format($n/100,2,".","'")."\n";
}


Output:
1
2
3
4
5
6
7
8
9
10
11
1 = 0.01
10 = 0.10
100 = 1.00
1000 = 10.00
10000 = 100.00
12 = 0.12
123 = 1.23
2134 = 21.34
23452 = 234.52
2345234 = 23'452.34
25437648758 = 254'376'487.58


Create a new paste based on this one


Comments: