Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Chapter 4 Branching statements and Program Design 4.2 The tangent function is de

ID: 3813631 • Letter: C

Question

Chapter 4 Branching statements and Program Design 4.2 The tangent function is defined as tan e sin e cos e. This expression evaluated to solve for the tangent as long as the magnitude of be to 0.(f cos is 0, evaluating the is not too equation for tan produce the heart write numer value Inf.) Assume that 6 is given in degrees, and the stat to evaluate tan e as long as the magnitude of cos is ements If the magnitude of cos is less greater than or equal to 10 mes 4.3 The following write out an error thermometer statements are intended to alert a user to dangerously high readings (values are in degrees Fahrenheit)

Explanation / Answer

function tangent()
prompt='Enter the value of theta ';
x = input(prompt);
x=x*pi/180;
if cos(x)>=10^(-20)
disp('tan(x) is');
tanx=sin(x)/cos(x);
disp(tanx);
else
disp('Errror cos(x) is less then 10^-20');
end
end

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote