Algorithm for finding factorial of any number 1. Take a number as input from the user. 2.
Initialize a variable fact=1 3. fact=fact*number 4. number=number-1 5. Repeat steps 3 to 5 till number>0. 6. Print the value of fact variable.
Algorithm for Sine Series computation
sin(x) = x - x3/3! + x5/5! x7/7!......xn/n!
1. Initialize variables i = 2, n, s = 1, x, pwr = 1, dr=1, nr = 1, x1, sum. 2. Take the value of the angle x for which the series has to be developed. 3. Make x1 as 3.142 * (x / 180.0) and sum = x1. 4. Take the number of terms from the user in n. 5. 6. 7. 8. 9. 10. pwr = pwr + 2; dr = dr * pwr * (pwr - 1); nr = nr * x1 * x1; s = s * (-1); sum = sum + (nr / dr) * s; i= i + 2;
11. Repeat steps 5 to 10 until i<=n. 12. Print the sum of the series.