[ create a new paste ] login | about

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

PHP, pasted on Dec 7:
1
2
3
4
5
6
7
8
9
10
11
12
<?php

$a = 1995;
$b = 2010;
$i = 0;

while ($b !== $a) {
   $i++;
   $a++;
}

printf("%d years difference", $i);


Output:
1
15 years difference


Create a new paste based on this one


Comments: