joe 发表于 2022-6-16 17:12:48

一个不错的在线编程网站

很多编程语言都可以在这个网站上在线练习:https://jsrun.net/

joe 发表于 2022-6-17 10:56:51

c = 13.2
b = 4
print("c / b = ",c / b, " c % b= ",c % b)
print(type("Hello world"))      --> string
print(type(10.4*3))             --> number
print(type(print))            --> function
print(type(type))               --> function
print(type(true))               --> boolean
print(type(nil))                --> nil
print(type(type(X)))            --> string

function myfun(arg)
if(arg == 0) then
   return 1
else
   return arg * myfun(arg-1)
end
end
print("myfun(5)=",myfun(5))



joe 发表于 2022-6-17 10:57:43

显示如下:
c / b =         3.3       c % b=         1.2
string
number
function
function
boolean
nil
string
myfun(5)=        120

页: [1]
查看完整版本: 一个不错的在线编程网站