[tips0018.vbs] Option Explicit Dim dblDeg2Rad ' 度→ラジアン変換用 dblDeg2Rad = 4 * Atn(1) / 180 ' 余弦 WScript.Echo "cos60°= " & Cos(dblDeg2Rad * 60) ' 正弦 WScript.Echo "sin60°= " & Sin(dblDeg2Rad * 60) ' 正接 WScript.Echo "tan60°= " & Tan(dblDeg2Rad * 60)
C:\> cscript //NoLogo tips0018.vbs cos60°= 0.5 sin60°= 0.866025403784439 tan60°= 1.73205080756888