Code has already been provided to define a function named divideBySeven that accepts a single input variable
Question:
Code has already been provided to define a function named divideBySeven that accepts a single input variable number that is any positive number. Add commands to use a while loop to repeatedly divide this number by 7 until the value remaining is less than 1. Your function should assign values to the two output variables as follows: Assign the final value of the number to the output variable whatsLeft. Count the number of divisions required and assign the result to the output variable divisionCount with unsigned 8-bit integer datatype. Note the value of the variable number is a function input. Be sure not to overwrite this value in your code. Be sure to assign values to each of the output variables.
Starter code:
function [whatsLeft, divisionCount] = divideBySeven(number)
%Enter the code for your function here.