Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Editor EAMATLAB\\moreFactorsof2.m moreFactors.m ×1 factorsOf3.m ×1 moreFactorsof

ID: 3705089 • Letter: E

Question

Editor EAMATLABmoreFactorsof2.m moreFactors.m ×1 factorsOf3.m ×1 moreFactorsof2.m × Untitled" ×1+ function m-moreFactorsof2 (a,b) %input : Takes as an input 3 positive integers %of the two integers a and b, the function returns %the integer that has the most factors (fact) If both integers a and b have the same amount of... ifactors (fact), the function will return the larger integer f-a if mod (a,2) -0&&mod; (b, 2)-0 if a>-b m-a: else m-b: end elseif mod (a, 2)0 && mod (b,2)- m=a; | elseif mod ( a, 2)--o “ mod ( b, 2)-? - m-b: elseif mod ( f, 2) ~#0 && mod (g,2)-#0 if a>-b m=a ; else m-b: end elseif mod ( f , 2 ) -0 && mod (g, 2)-#0 m-a: elseif mod ( f, 2)-=0 “ mod (g, 2)=-0 m-b; else t-f/2 9-9/2 m-moreFactorsof2 (f, g) ; end

Explanation / Answer

To keep the original values
store the value in other variable and return that variable for printing out
or else after the end of the loop everytime you can reassign thte value of a,b, to the presently used variable.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote