// F#
[]
let main argv =
let generateMatrix n m =
let rnd = System.Random()
Array2D.init n m (fun i j -> rnd.Next(10))
let inputArray = generateMatrix 5 6
printf "array: \n%A\n" (inputArray)
let maxIndex =
[1..Array2D.length1 inputArray]
|> Seq.map (fun row -> (row, inputArray.[row-1, *] |> Seq.sum))
|> Seq.maxBy (fun (i, sum) -> sum)
|> fst
printf "max index: %d" maxIndex
System.Console.ReadKey true |> ignore
0