A = 0;B = 0;C = 0;D = 0;E = 0;F = 0;G = 0;H = 0;I = 0;J = 0;K = 0;L = 0;M = 0;N = 0;O = 0;P = 0;Q = 0;R = 0;S = 0;T = 0;U = 0;V = 0;W = 0;X = 0;Y = 0;Z = 0;BAP = 0;AA = 0;BB = 0;CC = 0;DD = 0;EE = 0;FF = 0;GG = 0;HH = 0;II = 0;JJ = 0;KK = 0;LL = 0;MM = 0;NN = 0;OO = 0;PP = 0;QQ = 0;RR = 0;SS = 0;TT = 0;UU = 0;VV = 0;WW = 0;XX = 0;YY = 0;ZZ = 0;BEP = 0;AAA = 0;BBB = 0;CCC = 0;DDD = 0;EEE = 0;FFF = 0;GGG = 0;HHH = 0;III = 0;JJJ = 0;KKK = 0;LLL = 0;MMM = 0;NNN = 0;OOO = 0;PPP = 0;QQQ = 0;RRR = 0;SSS = 0;TTT = 0;UUU = 0;VVV = 0;WWW = 0;XXX = 0;YYY = 0;ZZZ = 0;BOP = 0;cDone = 'x';SHOW = 'x';disp ('=========================================');disp ('|| A B C || D E F || G H I ||');disp ('|| J K L || M N O || P Q R ||');disp ('|| S T U || V W X || Y Z BAP||');disp ('=========================================');disp ('|| AA BB CC|| DD EE FF|| GG HH II||');disp ('|| JJ KK LL|| MM NN OO|| PP QQ RR||');disp ('|| SS TT UU|| VV WW XX|| YY ZZ BEP||');disp ('=========================================');disp ('||AAA BBB CCC||DDD EEE FFF||GGG HHH III||');disp ('||JJJ KKK LLL||MMM NNN OOO||PPP QQQ RRR||');disp ('||SSS TTT UUU||VVV WWW XXX||YYY ZZZ BOP||');disp ('=========================================');bDone = true;while (bDone == true) disp('Please enter a cell (A, GG, BOP...) '); disp('Or if you wish to see your progress enter: "show"'); disp('Or type "continue" to begin calculations:'); iInput = upper(input ('','s')); switch (iInput) case {'SHOW'} disp (['=========================================']); disp (['|| ' int2str(A) ' ' int2str(B) ' ' int2str(C) ' || ' int2str(D) ' ' int2str(E) ' ' int2str(F) ' || ' int2str(G) ' ' int2str(H) ' ' int2str(I) ' ||']); disp (['|| ' int2str(J) ' ' int2str(K) ' ' int2str(L) ' || ' int2str(M) ' ' int2str(N) ' ' int2str(O) ' || ' int2str(P) ' ' int2str(Q) ' ' int2str(R) ' ||']); disp (['|| ' int2str(S) ' ' int2str(T) ' ' int2str(U) ' || ' int2str(V) ' ' int2str(W) ' ' int2str(X) ' || ' int2str(Y) ' ' int2str(Z) ' ' int2str(BAP) ' ||']); disp (['=========================================']); disp (['|| ' int2str(AA) ' ' int2str(BB) ' ' int2str(CC) ' || ' int2str(DD) ' ' int2str(EE) ' ' int2str(FF) ' || ' int2str(GG) ' ' int2str(HH) ' ' int2str(II) ' ||']); disp (['|| ' int2str(JJ) ' ' int2str(KK) ' ' int2str(LL) ' || ' int2str(MM) ' ' int2str(NN) ' ' int2str(OO) ' || ' int2str(PP) ' ' int2str(QQ) ' ' int2str(RR) ' ||']); disp (['|| ' int2str(SS) ' ' int2str(TT) ' ' int2str(UU) ' || ' int2str(VV) ' ' int2str(WW) ' ' int2str(XX) ' || ' int2str(YY) ' ' int2str(ZZ) ' ' int2str(BEP) ' ||']); disp (['=========================================']); disp (['|| ' int2str(AAA) ' ' int2str(BBB) ' ' int2str(CCC) ' || ' int2str(DDD) ' ' int2str(EEE) ' ' int2str(FFF) ' || ' int2str(GGG) ' ' int2str(HHH) ' ' int2str(III) ' ||']); disp (['|| ' int2str(JJJ) ' ' int2str(KKK) ' ' int2str(LLL) ' || ' int2str(MMM) ' ' int2str(NNN) ' ' int2str(OOO) ' || ' int2str(PPP) ' ' int2str(QQQ) ' ' int2str(RRR) ' ||']); disp (['|| ' int2str(SSS) ' ' int2str(TTT) ' ' int2str(UUU) ' || ' int2str(VVV) ' ' int2str(WWW) ' ' int2str(XXX) ' || ' int2str(YYY) ' ' int2str(ZZZ) ' ' int2str(BOP) ' ||']); disp (['=========================================']); bNoGood = false; case {'A'} bNoGood = true; while (bNoGood == true) disp ('Please enter the number in slot number A'); disp ('Enter 0 if unknown: '); A = input (''); if (A < 0) disp ('Number is too low.'); elseif (A > 9) disp ('Number is too high.'); else bNoGood = false; end%end if end%limit loop case {'B'} bNoGood = true; while (bNoGood == true) disp ('Please enter the number in slot number B'); disp ('Enter 0 if unknown: '); B = input (''); if (B < 0) disp ('Number is too low.'); elseif (B > 9) disp ('Number is too high.'); else bNoGood = false; end%end if end%limit loop case {'C'} bNoGood = true; while (bNoGood == true) disp ('Please enter the number in slot number C'); disp ('Enter 0 if unknown: '); C = input (''); if (C < 0) disp ('Number is too low.'); elseif (C > 9) disp ('Number is too high.'); else bNoGood = false; end%end if end%limit loop otherwise disp(['You have indicated that you are done inputting, is this true?']); disp(['Enter Yes (Y) to confirm.']); cDone = lower(input('','s')); if (cDone == 'y' ) bDone = false; else disp (['You can continue...']); bDone = true; end%end if Done end%end slot selector input Switchend %end while that loops inputs% B = input(['Please enter the number in slot number B: ']);% C = input(['Please enter the number in slot number C: ']);% D = input(['Please enter the number in slot number D: ']);% E = input(['Please enter the number in slot number E: ']);% F = input(['Please enter the number in slot number F: ']);% G = input(['Please enter the number in slot number G: ']);% H = input(['Please enter the number in slot number H: ']);% I = input(['Please enter the number in slot number I: ']);% J = input(['Please enter the number in slot number J: ']);% K = input(['Please enter the number in slot number K: ']);% L = input(['Please enter the number in slot number L: ']);% % M = input(['Please enter the number in slot number M: ']);% % N = input(['Please enter the number in slot number N: ']);% % O = input(['Please enter the number in slot number O: ']);% % P = input(['Please enter the number in slot number P: ']);% % Q = input(['Please enter the number in slot number Q: ']);% % R = input(['Please enter the number in slot number R: ']);% S = input(['Please enter the number in slot number S: ']);% T = input(['Please enter the number in slot number T: ']);% U = input(['Please enter the number in slot number U: ']);% % V = input(['Please enter the number in slot number V: ']);% % W = input(['Please enter the number in slot number W: ']);% % X = input(['Please enter the number in slot number X: ']);% % Y = input(['Please enter the number in slot number Y: ']);% % Z = input(['Please enter the number in slot number Z: ']);% % a = input(['Please enter the number in slot number a: ']);% AA = input(['Please enter the number in slot number AA: ']);% % BB = input(['Please enter the number in slot number BB: ']);% % CC = input(['Please enter the number in slot number CC: ']);% % DD = input(['Please enter the number in slot number DD: ']);% % EE = input(['Please enter the number in slot number EE: ']);% % FF = input(['Please enter the number in slot number FF: ']);% % GG = input(['Please enter the number in slot number GG: ']);% % HH = input(['Please enter the number in slot number HH: ']);% % II = input(['Please enter the number in slot number II: ']);% JJ = input(['Please enter the number in slot number JJ: ']);% % KK = input(['Please enter the number in slot number KK: ']);% % LL = input(['Please enter the number in slot number LL: ']);% % MM = input(['Please enter the number in slot number MM: ']);% % NN = input(['Please enter the number in slot number NN: ']);% % OO = input(['Please enter the number in slot number OO: ']);% % PP = input(['Please enter the number in slot number PP: ']);% % QQ = input(['Please enter the number in slot number QQ: ']);% % RR = input(['Please enter the number in slot number RR: ']);% SS = input(['Please enter the number in slot number SS: ']);% % TT = input(['Please enter the number in slot number TT: ']);% % UU = input(['Please enter the number in slot number UU: ']);% % VV = input(['Please enter the number in slot number VV: ']);% % WW = input(['Please enter the number in slot number WW: ']);% % XX = input(['Please enter the number in slot number XX: ']);% % YY = input(['Please enter the number in slot number YY: ']);% % ZZ = input(['Please enter the number in slot number ZZ: ']);% % aa = input(['Please enter the number in slot number aa: ']);% AAA = input(['Please enter the number in slot number AAA: ']);% % BBB = input(['Please enter the number in slot number BBB: ']);% % CCC = input(['Please enter the number in slot number CCC: ']);% % DDD = input(['Please enter the number in slot number DDD: ']);% % EEE = input(['Please enter the number in slot number EEE: ']);% % FFF = input(['Please enter the number in slot number FFF: ']);% % GGG = input(['Please enter the number in slot number GGG: ']);% % HHH = input(['Please enter the number in slot number HHH: ']);% % III = input(['Please enter the number in slot number III: ']);% JJJ = input(['Please enter the number in slot number JJJ: ']);% % KKK = input(['Please enter the number in slot number KKK: ']);% % LLL = input(['Please enter the number in slot number LLL: ']);% % MMM = input(['Please enter the number in slot number MMM: ']);% % NNN = input(['Please enter the number in slot number NNN: ']);% % OOO = input(['Please enter the number in slot number OOO: ']);% % PPP = input(['Please enter the number in slot number PPP: ']);% % QQQ = input(['Please enter the number in slot number QQQ: ']);% % RRR = input(['Please enter the number in slot number RRR: ']);% SSS = input(['Please enter the number in slot number SSS: ']);% % TTT = input(['Please enter the number in slot number TTT: ']);% % UUU = input(['Please enter the number in slot number UUU: ']);% % VVV = input(['Please enter the number in slot number VVV: ']);% % WWW = input(['Please enter the number in slot number WWW: ']);% % XXX = input(['Please enter the number in slot number XXX: ']);% % YYY = input(['Please enter the number in slot number YYY: ']);% % ZZZ = input(['Please enter the number in slot number ZZZ: ']);% % aaa = input(['Please enter the number in slot number aaa: ']);%% if (A == 0)% disp ('A is unknown')% if (A==1)&&(A~=B)&&(A~=C)&&(A~=D)&&(A~=E)&&(A~=F)&&(A~=G)&&(A~=H)&&(A~=I)...% &&(A~=J)&&(A~=S)&&(A~=AA)&&(A~=JJ)&&(A~=SS)&&(A~=AAA)...% &&(A~=JJJ)&&(A~=SSS)&&(A~=K)&&(A~=L)&&(A~=T)&&(A~=U)% disp ('A = 1')% elseif (A==2)&&(A~=B)&&(A~=C)&&(A~=D)&&(A~=E)&&(A~=F)&&(A~=G)&&(A~=H)&&(A~=I)...% &&(A~=J)&&(A~=S)&&(A~=AA)&&(A~=JJ)&&(A~=SS)&&(A~=AAA)...% &&(A~=JJJ)&&(A~=SSS)&&(A~=K)&&(A~=L)&&(A~=T)&&(A~=U)% disp ('A = 2')% elseif (A==3)&&(A~=B)&&(A~=C)&&(A~=D)&&(A~=E)&&(A~=F)&&(A~=G)&&(A~=H)&&(A~=I)...% &&(A~=J)&&(A~=S)&&(A~=AA)&&(A~=JJ)&&(A~=SS)&&(A~=AAA)...% &&(A~=JJJ)&&(A~=SSS)&&(A~=K)&&(A~=L)&&(A~=T)&&(A~=U)% disp ('A = 3')% elseif (A==4)&&(A~=B)&&(A~=C)&&(A~=D)&&(A~=E)&&(A~=F)&&(A~=G)&&(A~=H)&&(A~=I)...% &&(A~=J)&&(A~=S)&&(A~=AA)&&(A~=JJ)&&(A~=SS)&&(A~=AAA)...% &&(A~=JJJ)&&(A~=SSS)&&(A~=K)&&(A~=L)&&(A~=T)&&(A~=U)% disp ('A = 4')% elseif (A==5)&&(A~=B)&&(A~=C)&&(A~=D)&&(A~=E)&&(A~=F)&&(A~=G)&&(A~=H)&&(A~=I)...% &&(A~=J)&&(A~=S)&&(A~=AA)&&(A~=JJ)&&(A~=SS)&&(A~=AAA)...% &&(A~=JJJ)&&(A~=SSS)&&(A~=K)&&(A~=L)&&(A~=T)&&(A~=U)% disp ('A = 5')% elseif (A==6)&&(A~=B)&&(A~=C)&&(A~=D)&&(A~=E)&&(A~=F)&&(A~=G)&&(A~=H)&&(A~=I)...% &&(A~=J)&&(A~=S)&&(A~=AA)&&(A~=JJ)&&(A~=SS)&&(A~=AAA)...% &&(A~=JJJ)&&(A~=SSS)&&(A~=K)&&(A~=L)&&(A~=T)&&(A~=U)% disp ('A = 6')% elseif (A==7)&&(A~=B)&&(A~=C)&&(A~=D)&&(A~=E)&&(A~=F)&&(A~=G)&&(A~=H)&&(A~=I)...% &&(A~=J)&&(A~=S)&&(A~=AA)&&(A~=JJ)&&(A~=SS)&&(A~=AAA)...% &&(A~=JJJ)&&(A~=SSS)&&(A~=K)&&(A~=L)&&(A~=T)&&(A~=U)% disp ('A = 7')% elseif (A==8)&&(A~=B)&&(A~=C)&&(A~=D)&&(A~=E)&&(A~=F)&&(A~=G)&&(A~=H)&&(A~=I)...% &&(A~=J)&&(A~=S)&&(A~=AA)&&(A~=JJ)&&(A~=SS)&&(A~=AAA)...% &&(A~=JJJ)&&(A~=SSS)&&(A~=K)&&(A~=L)&&(A~=T)&&(A~=U)% disp ('A = 8')% else% disp ('A = 9')% end% else% disp ('A is known')%% end% MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMfor (A = 1:1:9) if ((A~=B)&&(A~=C)&&(A~=D)&&(A~=E)&&(A~=F)&&(A~=G)&&(A~=H)&&(A~=I)... &&(A~=J)&&(A~=S)&&(A~=AA)&&(A~=JJ)&&(A~=SS)&&(A~=AAA)... &&(A~=JJJ)&&(A~=SSS)&&(A~=K)&&(A~=L)&&(A~=T)&&(A~=U)) disp(['A= ' int2str(A)]); else disp(['Slot A cannot be any number 1-9 because of an incorrectly made puzzle'])% bDone = true; end%endifend%endfor