I was given:

` clc; n=input('how many numbers are in your list?'); for i=1:n y=['enter a number', num2str(i)]; disp (y) x(i)=input('');end`

and the list of numbers to plug in. I need to finish the program so it will choose the largest from my list. This is what I have so far:

` if x(i)<=y [newx,newy]=swap (x,y) newx=y newy=xelse x(i)>y disp('The largest number in the list is')end`

This program runs but does not give me a single value. What should i do to fix it?

## Best Answer