Write a program that asks for an angle as the input passes t

Write a program that asks for an angle as the input, passes that angle to the sine function, and displays the result to five decimal places as: The sine of is If 0.3 is entered as the angle, the result would be: The sine of 0.30000 is 0.29552.

Solution

% matlab code

degreeAngle = input(\"Enter angle: \");
fprintf(\"The sine of %0.5f is %0.5f\ \",degreeAngle, sin(degreeAngle));

%{
output:

Enter angle: 0.3
The sine of 0.30000 is 0.29552

%}

 Write a program that asks for an angle as the input, passes that angle to the sine function, and displays the result to five decimal places as: The sine of is

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site