

x=0 p=Grid.GetRowCount("Grid1"); s=Grid.GetColumnCount("Grid1"); for i=x,p do c= Grid.GetCellText("Grid1", i, 0); Grid.SetCellText("Grid1", i,s-1 , c, true); end
111111111111111222222222222222
222222222222222111111111111111
local function fact(n)
if (n == 0) then
return 1;
else
return n*fact(n-1);
end
end
x = Input.GetText("Input1");
result = Dialog.Message("Notice",fact(x)/(fact(x/2)*(fact(x-x/2))));
p=Grid.GetRowCount("Grid1");
s=Grid.GetColumnCount("Grid1");
for i=0,Math.Floor(s/2) do
for j = 0 , p do
k1= Grid.GetCellText("Grid1", j,i );
k2= Grid.GetCellText("Grid1", j,s-i );
Grid.SetCellText("Grid1", j,s-i , k1, true);
Grid.SetCellText("Grid1", j,i, k2, true);
end
end
p=Grid.GetRowCount("Grid1");
s=Grid.GetColumnCount("Grid1");
for i=0,Math.Floor(s/2) do
for j = 0 , p do
k1= Grid.GetCellText("Grid1", j,i );
k2= Grid.GetCellText("Grid1", j,s-(i+1) );
Grid.SetCellText("Grid1", j,s-(i+1), k1, true);
Grid.SetCellText("Grid1", j,i, k2, true);
end
end
a = {1,2,3}
n = Table.Count(a);
table_values = Table.Concat(a, ",", 1, TABLE_ALL);
p =""
r = ""
for f = 1,n do
r=r.."{"..a[f].."}".."\r\n"
end
for i = 1,n do
for j = 1 , i do
if i ~= j then
p=p.."{"..a[i]..","..a[j].."}".."\r\n"
end
end
end
Dialog.Message("Notice","{}".."\r\n"..r.. p.."{"..table_values.."}");
x = Input.GetText("Input1");
x = String.ToNumber(x);
n = x * ((x + 2) * (2*x + 1)) / 8
n = Math.Floor(n);
Input.SetText("Input2", n);
تعليق