What is the output of the following codes? a. function answer = foo(a, b, c) answer = a; if b > answer answer = b end if c > answer answer = c; end end b. a = [ 3 6 2 9 4] c = 1 e = [] for i = a e(c)= ( a(c) + 1 ); c = c + 1; end disp (e)

a) foo function finds the maximum of a, b, c. if we call the function foo(2,3,5)..Then Output will be 5
b) 4 7 3 10 5
See Output for (b)
https://d2vlcm61l7u1fs.cloudfront.net/media%2Fd82%2Fd82c4c6b-e85e-45ef-b1b4-f3be3554731c%2FphpGGB18O.png
 
“Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!”

What Students Are Saying About Us

.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐
"Honestly, I was afraid to send my paper to you, but splendidwritings.com proved they are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"

.......... Customer ID: 14***| Rating: ⭐⭐⭐⭐⭐
"The company has some nice prices and good content. I ordered a term paper here and got a very good one. I'll keep ordering from this website."

"Order a Custom Paper on Similar Assignment! No Plagiarism! Enjoy 20% Discount"