Question: Write a while loop that adjusts userValue while userValue is less than 0 or greater than 8 0 . If userValue is greater than 8

Write a while loop that adjusts userValue while userValue is less than 0 or greater than 80. If userValue is greater than 80, then subtract 5 from userValue. If userValue is less than 0, then add 10 to userValue.function userValue = AdjustValue(userValue)
% Write a while loop that adjusts a userValue while userValue is less than 0
% or greater than 80
userValue =0;
% If the userValue is greater than 80, then subtract 5 from userValue
% If the user value is less than 0, then add 10 to userValue
end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!