Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

program-to-find-value-of-sinx-using-expansion-series

VIEWS: 2,278 PAGES: 2

									www.EasyGuides.By3.in

Designed By Manibharathi

/*
Program to Find Value of sin(x) using Expansion Series Given Below:

sin(x) */

=

x

-

x3/3!

+

x5/5!

-

x7/7!........

#include <stdio.h> #include <math.h>

main() { float base, pwr, sum, c=1, m=2, i=3, g, h;

printf("\nEnter the base value: "); scanf("%f", &base); printf("\nEnter the power value: "); scanf("%f", &pwr);

sum ab: m =

=

base;

m

*

i;

h = pow(-1, c); g = pow(base, i);

sum = sum + (h * g) / m; i = i + 2; c++; m = m * (i 1);

www.EasyGuides.By3.in

Designed By Manibharathi

if (i <= pwr) goto ab;

printf("\n\nSum = %f", sum); getch(); }


								
To top