Fibonacci sequence


$1 = 0
$2 = 1
1..100 | ForEach-Object{
    if($_%2 -eq 1){
        $1 = $1+$2
        $1
    }
    Else{
        $2 = $1+$2
        $2
    }
}

Leave a Reply