cf.lua 293 B

12345678910111213141516
  1. -- temperature conversion table (celsius to farenheit)
  2. for c0=-20,50-1,10 do
  3. io.write("C ")
  4. for c=c0,c0+10-1 do
  5. io.write(string.format("%3.0f ",c))
  6. end
  7. io.write("\n")
  8. io.write("F ")
  9. for c=c0,c0+10-1 do
  10. f=(9/5)*c+32
  11. io.write(string.format("%3.0f ",f))
  12. end
  13. io.write("\n\n")
  14. end