Answer:
clc
clear
x = input('type value of angle in degrees:\\');
x = x*pi/180; %convverting fron degree to radian
sin_x = x; %as first term of taylor series is x
E = 1; %just giving a value of error greater than desired error
n = 0;
while E > 0.000001
previous = sin_x;
n = n+1;
sin_x = sin_x + ((-1)^n)*(x^(2*n+1))/factorial(2*n+1);
E = abs(sin_x - previous); %calculating error
end
a = sprintf('sin(x) = %1.6f',sin_x);
disp(a)
Step-by-step explanation: