كذلك انا لم انتبه للتعديل
لكن لا بأس
موفق
لكن لا بأس
موفق
function belkiss (str,str2)
B4="";C4="";E4="";B5="";C5="";E5="";x=1;x2=1;y=1;y2=1
for i in string.gmatch(str, "%A+") do
if x==1 then
B4=(B4)..i;elseif x==2 then
C4=(C4)..string.sub(i,2,string.len(i))
elseif x==3 then
E4=(E4)..string.sub(i,2,string.len(i))
end;x=x+1;end
for i in string.gmatch(str2, "%A+") do
if y==1 then
B5=(B5)..i;elseif y==2 then
C5=(C5)..string.sub(i,2,string.len(i))
elseif y==3 then
E5=(E5)..string.sub(i,2,string.len(i))
end;y=y+1;end
return "X = "..((E4)*C5-(E5)*C4)/(B4*C5-B5*C4).."\r\n".."Y ="..((E5)*B4-(E4)*B5)/(B4*C5-B5*C4)
end
n1 ="6x+8y=312"
n2 ="1x+1y=48"
Dialog.Message("Notice",belkiss (n1,n2));
تعليق