Ask Question
21 August, 06:28

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

+1
Answers (1)
  1. 21 August, 08:50
    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?
Find 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 you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers