Programming Fundamentals/Variables/Bash

From Wikiversity
Jump to navigation Jump to search[edit | edit source]


# This program converts a Fahrenheit temperature to Celsius.
# References:

echo -n "Enter Fahrenheit temperature: "
read fahrenheit


echo "$fahrenheit° Fahrenheit is $celsius° Celsius"

Try It[edit | edit source]

Copy and paste the code above into one of the following free online development environments or use your own Bash compiler / interpreter / IDE.

See Also[edit | edit source]