Solving the equation to answer (x + 50-10x) (5-x + 10x) = 736

Solving the equation to answer (x + 50-10x) (5-x + 10x) = 736


(x+50—10X)(5-x+10x)=736
(-9x+50)(9x+5)=736
-81^2-45x+450x+250=736
-81^2+405x-486=0
X = 2 or x = 3



Design an algorithm to find the positive integer solution of equation 5x + 2Y = 22


i=1;
for x=1:5
for y=1:10
k=5*x+2*y;
if k==22
a(i,1)=x;a(i,2)=y;
i=i+1;
end;
end;
end;
This is compiled with MATLAB, and the X and Y satisfying the condition are stored in the array a