matlab 7. Use a for loop no determine the and number of all odd integers from 1
ID: 3857371 • Letter: M
Question
matlab
Explanation / Answer
7)
Matlab Programming :-
startValue=1;
stepValue=2;
stopValue=100;
theSum = 0;
theCount = 0;
for x = startValue : stepValue : stopValue
check = mod(x,3);
if check == 0
theSum = theSum + x;
theCount = theCount + 1;
end
end
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.