June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -0,0 +1,12 @@
#!/bin/ksh
# Temperature conversion
typeset tt[1]=0.00 tt[2]=273.15 tt[3]=373.15
for i in {1..3}
do
((t=tt[i]))
echo $i
echo "Kelvin: $t K"
echo "Celsius: $((t-273.15)) C"
echo "Fahrenheit: $((t*18/10-459.67)) F"
echo "Rankine: $((t*18/10)) R"
done

View file

@ -0,0 +1,12 @@
#!/bin/bash
# Temperature conversion
tt[1]=0.00; tt[2]=273.15; tt[3]=373.15
for i in {1..3}
do
t=${tt[$i]}
echo $i
echo "Kelvin: $t K"
echo "Celsius: $(bc<<<"scale=2;$t-273.15") C"
echo "Fahrenheit: $(bc<<<"scale=2;$t*18/10-459.67") F"
echo "Rankine: $(bc<<<"scale=2;$t*18/10") R"
done