echo century(1756)."\n";
echo century(1555)."\n";
echo century(1000)."\n";
echo century(1001)."\n";
echo century(2005)."\n";


// Get the Century
function century($year) {
	$suf = 'th';
	if ($year > 2000) {
		$suf = 'st';
	}
	return ceil($year/100).$suf.' century';
}
by ვაჟა ტყემალაძე
1 year ago
PHP
Problem Solving
php
Note
Problem
0
Pro tip: use ```triple backticks around text``` to write in code fences