mirror of
https://github.com/Xevion/exercism.git
synced 2025-12-09 04:07:10 -06:00
PowerShell - leap, raindrops, reverse-string, two-fer
This commit is contained in:
9
powershell/leap/LeapYear.ps1
Normal file
9
powershell/leap/LeapYear.ps1
Normal file
@@ -0,0 +1,9 @@
|
||||
function Test-LeapYear {
|
||||
param( [int]$year )
|
||||
|
||||
if ((($year % 4 -eq 0) -and !($year % 100 -eq 0)) -or ($year % 400 -eq 0)) {
|
||||
return $true
|
||||
}
|
||||
|
||||
return $false
|
||||
}
|
||||
Reference in New Issue
Block a user