Simple Sand Samples |
説明のないとってもシンプルなサンプルプログラム集
COBOL | awk | C言語 | D言語 | GO言語 | Lua | Vim |
bash | Perl | Gauche | Clojure | CLISP | EmacsLisp | VimScript |
tcsh | Ruby | Groovy | Java | C# | VBScript | JavaScript |
Io言語 | Python | Erlang | Scala | VB.NET | Excel/VBA | PHP |
Tcl | Haskell | OCaml | PowerShell | Windows | Unix/Linux |
PowerShell > 円周率・三角関数
trigon.ps1
|
|
Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. All rights reserved.
PS C:\Users\takk> [math]::pi
3.14159265358979
PS C:\Users\takk> $r_rad=30*[math]::pi/180
PS C:\Users\takk> [math]::sin($r_rad)
0.5
PS C:\Users\takk> [math]::cos($r_rad)
0.866025403784439
PS C:\Users\takk> [math]::tan($r_rad)
0.577350269189626
PS C:\Users\takk>
Copyright (C) 2014 Microsoft Corporation. All rights reserved.
PS C:\Users\takk> [math]::pi
3.14159265358979
PS C:\Users\takk> $r_rad=30*[math]::pi/180
PS C:\Users\takk> [math]::sin($r_rad)
0.5
PS C:\Users\takk> [math]::cos($r_rad)
0.866025403784439
PS C:\Users\takk> [math]::tan($r_rad)
0.577350269189626
PS C:\Users\takk>