Professional Documents
Culture Documents
Complex No
Complex No
clear;
array=(1:p);
for i=1:n
array(i)=input('' );
end
sum=0;
for i=1:n
sum = sum + array(i);
end
q=input('At what position (should be less than or equal to size of the array) of
the array do you want to store the sum? ' );
array(q)=sum;