Unformatted text preview: B = 0 for index = x B = B + index/length(x) end % 2) What method is used above to find A and B? Store your answer as a % string in the variables named A_method and B_method. Each variable % should be exactly equal to either 'direct-access' or 'indexing'. A_method = 'indexing' B_method = 'direct-access' % 3) while loops. The while loop below is supposed to store the mean of all % the elements in x in the variable C. Replace the comments %fill me in% % so that the below while loop will work correctly. C = 0 count = 1 while count <= length(x) C = C + x(count)/length(x) count = count + 1 end...
View Full Document
- Fall '08
- loop, Imperative programming, variable C. Replace