This is was I have so far…
prompt = 'What is the original value?' ;N = input(prompt);values = 1:N;for i = (1:N); x = mod(i ,5); if x == 0 disp('divisable by 5') num2str(i) disp(i) else disp('not divisable by 5') end end
I can access all the numbers that have passed but I don't know how to add them into a sum that doesn't include the user input.
Best Answer