/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docs/fundamentals/runtime-libraries/snippets/System/FormatException/Overview/fsharp/starting3.fs
22 строки
533 B
Genevieve Warren
Move member remarks (#39270)
30 янв 2024, 00:43
Не верифицирован
30 янв 2024, 00:43
6c88824
Код
Авторство
О чём код?
module starting3 // <Snippet33> open System open System.Text let years = [| 2013; 2014; 2015 |] let population = [| 1025632; 1105967; 1148203 |] let sb = StringBuilder() sb.Append(String.Format("{0,6} {1,15}\n\n", "Year", "Population")) |> ignore for i = 0 to years.Length - 1 do sb.Append(String.Format("{0,6} {1,15:N0}\n", years[i], population[i])) |> ignore printfn $"{sb}" // Result: // Year Population // // 2013 1,025,632 // 2014 1,105,967 // 2015 1,148,203 // </Snippet33>