- #1
DryRun
Gold Member
- 838
- 4
Suppose that the number ##\pi## is divided by 2. The resulting quotient is divided by 2 again. This process is continued till the current quotient is less than or equal to 0.01. What is the largest quotient that is greater than 0.01?
Here is my attempt:
The processing takes about 20 or 30 seconds and then i get this error in the command window:
Out of memory. Type HELP MEMORY for your options.
Error in piquo (line 7)
num(r) = quo;
Here is my attempt:
Code:
r = 1;
quo = 1;
while (quo > 0.01)
quo = pi / 2;
num(r) = quo;
r = r+1;
end
disp('The largest quotient greater than 0.01 is: ' ,(num(r-1)) )
The processing takes about 20 or 30 seconds and then i get this error in the command window:
Out of memory. Type HELP MEMORY for your options.
Error in piquo (line 7)
num(r) = quo;