samedi 19 septembre 2020

Unexpected infix operator in expression F#

I am trying to calculate the expression i and I can't figure out how to print the value as I'm new to f#.

let mutable sqSum = 0.0
    let mutable sqrRoot = 0.0 
    for i in [startNum..endNum] do
        for j in [i..(i+k-1)] do
            let x = j |> double
            sqSum <- x*x
        sqrRoot <- sqrt sqSum
         
        if <>sqrRoot % 1.0 > 0.0 then
            printfn "%i" i

Aucun commentaire:

Enregistrer un commentaire