myCompiler
English
Deutsch
English
Español
Français
Italiano
日本語
한국어
Nederlands
Polski
Português
Recent
Login
Sign up
Deutsch
English
Español
Français
Italiano
日本語
한국어
Nederlands
Polski
Português
Recent
Login
Sign up
A
@Ada_Tewari
Area of Triangle (Revision)
Lua
4 years ago
h=io.read("*n") b=io.read("*n") Area=(0.5*(h*b)) print ("The area os the triangle is",Area)
To swap Variables (Revision)
Lua
4 years ago
a=io.read ("*n") b=io.read ("*n") print ("The value of a is",a) print ("The value of b is",b) d=a a=b b=d print ("We have swapped the variables") print ("The value of a is",a) print ("The value of b is",b)
Project zone C
Lua
4 years ago
A=(50*48) B=(55*45) if (A>B) then print ("class A has collected more fund") elseif (B>A) then print ("class B has collected more fund") else print ("class A and B have collected equal amount of fund")
HOTS 2
Lua
4 years ago
grade=io.read("*n") if (grade>=90) then print("You have scored an O") elseif (grade<90)and(grade>=80) then print("You have scored an A") elseif (grade<80)and(grade>=70) then print("You have scored a B")
Q5
Lua
4 years ago
num1= io.read ("*n") num2= io.read ("*n") print ("The sum of",num1,"and",num2,"is",num1+num2) print ("the difference of",num1,"and",num2,"is",num1-num2) print ("the product of",num1,"and",num2,"is",num1*num2) print ("the quotient of",num1,"and",num2
Q4
Lua
4 years ago
print ("enter your name \n") name=io.read () print ("enter your age \n") age=io.read ("*n") io.write ("You are ",name," of age ",age) newage= age+5 io.write (" ,your age after 5 years will be ",newage)
Q 3
Lua
4 years ago
x=25 y= "twenty five" print ("The value of x is",x,"and value in y is",y)
Q 2
Lua
4 years ago
print ("Enter your name \n") name= io.read () print ("Enter your age \n") age= io.read ("*n") io.write ("you are " ,name, " of age ",age)
Q 1
Lua
4 years ago
print ("national public school, whitefield \n") print ("Ada \n") print ("11")
Previous
Next page