function secondLoopProgramPowersOfTenVersion
% translation of second loop program in Ch 10 from C to Matlab,
% using powers of 10 instead of powers of 2
x = single(1);
Copyright By PowCoder代写 加微信 powcoder
y = single(2);
while y > 1
x = single(x/10); % divide by 10
y = single(1 + x);
n = n + 1;
fprintf(‘1 added to (10 raised to the power -%d) is %15.10e\n’, n, y)
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com