1 C
C
Copy
int centuryFromYear(int year) {
return (year+99)/100;
}
2 C++
C++
Copy
int centuryFromYear(int year)
{
return (year+99)/100;
}
3 Go
Go
Copy
package kata
func century(year int) int {
return (year+99)/100;
}
4 R
R