Ask Question
5 April, 05:36

function summedValue = SummationWithLoop (userNum) % Summation of all values from 1 to userNum summedValue = 0; i = 1; % Write a while loop that assigns summedValue with the % sum of all values from 1 to userNum end

+3
Answers (1)
  1. 5 April, 07:10
    0
    function summedValue = SummationWithLoop (userNum)

    % Summation of all values from 1 to userNum

    summedValue = 0;

    i = 0;

    % use a while loop that assigns summedValue with the

    % sum of all values from 1 to userNum

    while (i < = userNum)

    summedValue = summedValue + i;

    i = i + 1;

    end

    end
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “function summedValue = SummationWithLoop (userNum) % Summation of all values from 1 to userNum summedValue = 0; i = 1; % Write a while loop ...” in 📙 Engineering if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers