<?php
header('Content-type: text/plain');
include_once('roman.php');
try
{
$roman = new roman();
for($i = 1; $i <= 10; $i++)
{
$r = $roman->encode($i);
$d = $roman->decode($r);
echo $i . ' : ' . $r . ' = ' . $d . "\n";
}
}
catch(Exception $e)
{
echo 'something goes wrong';
}
|