Hi Welcome here My Name os logicpro and I will help you. 1), n=4; then A is 81 2), n=2; then A is 9 3), n=10; then A is 0.3

Proof: If n = 4 then following if condition will be true: if n<=5 Since a is 3, 3 will be raised to the power 4 and result will be stored in A so A = 3 ^ 4 = 81

If n = 2 then following if condition will be true: if n<=5 Since a is 3, 3 will be raised to the power 2 and result will be stored in A so A = 3 ^ 2= 9

If n = 10 then following if condition will be true: elseif n<=10 Since a is 3, 3 will be devided by 10 and result will be stored in A so A = 3 / 10 = 0.3 (rounded off)

You can ask me again using "For LogicPro only" at the start of your questions like other customers to get instant answers.

so you can come back and ask me a question anytime.

Remember, if for any reason you are unsatisfied with my answer, we can continue the conversation until you’re satisfied and rate my answer as excellent. I can address follow up questions on original requirements at no extra charge and I’m always here to help.

I wanted to know how to write it exactly in matlab program and I don't have the matlab program in my computer so I need you to solve it in matlab and copy what you typed thanks

Hi again, Just following up with you to see how everything is going and if you have more questions for me. You can ask me again using "For LogicPro only" at the start of your questions like you do to get instant answers. It will ensure that question is for me. Please bookmark my profile page: http://www.justanswer.com/homework/expert-logicpro/ so you can come back and ask me a question anytime. If you need any additional information on this answer, please don't hesitate to ask by clicking on 'Reply to Expert', and I will reply as soon as possible. I hope you found the information in my answer helpful, and if so, please let me know, here. Thank you! Thanks very much for using Just Answer! Best wishes LogicPro