PoshCode Archive  Artifact [224bd1e7c5]

Artifact 224bd1e7c5ca60381ae3c3ab5b017d477c0037753917c7314833126ad772d673:

  • File ConvertFrom-FahrenheitWi.ps1 — part of check-in [5dbfc3b835] at 2018-06-10 13:05:38 on branch trunk — From Windows PowerShell Cookbook (O’Reilly) by Lee Holmes (user: Lee Holmes size: 638)

# encoding: ascii
# api: powershell
# title: ConvertFrom-FahrenheitWi
# description: From Windows PowerShell Cookbook (O’Reilly) by Lee Holmes
# version: 1.8
# author: Lee Holmes
# license: CC0
# x-poshcode-id: 2136
# x-archived: 2016-05-17T07:19:00
# x-published: 2011-09-09T21:40:00
#
#
## From Windows PowerShell Cookbook (O'Reilly)
## by Lee Holmes (http://www.leeholmes.com/guide)

param([double] $Fahrenheit)

Set-StrictMode -Version Latest

## Convert it to Celsius
$celsius = $fahrenheit - 32
$celsius = $celsius / 1.8

## Output the answer
"$fahrenheit degrees Fahrenheit is $celsius degrees Celsius."