Imported Upstream version 5.1.5
[platform/upstream/lua.git] / test / cf.lua
1 -- temperature conversion table (celsius to farenheit)
2
3 for c0=-20,50-1,10 do
4         io.write("C ")
5         for c=c0,c0+10-1 do
6                 io.write(string.format("%3.0f ",c))
7         end
8         io.write("\n")
9         
10         io.write("F ")
11         for c=c0,c0+10-1 do
12                 f=(9/5)*c+32
13                 io.write(string.format("%3.0f ",f))
14         end
15         io.write("\n\n")
16 end