[ create a new paste ] login | about

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

PHP, pasted on Sep 15:
1
2
3
4
5
6
7
8
9
10
11
<?php
$input = 423219;
$rev = 0;

while ($input > 0) {
    $rev = ($rev * 10 + ($input % 10) );
    $input = floor($input / 10);
    echo $input;
}

echo $rev;


Output:
1
4232142324234240912324


Create a new paste based on this one


Comments: