Value of sinx by c ++
OUTPUT:
THEORY:
CODING:
#include<iostream.h>
#include<conio.h>
#include<math.h>
int main()
{
int
i,j,fact,sign=-1;
float
x,p,sum=0,n=10;
clrscr();
cout<<"enter
the value of x= \n";
cin>>x;
x=3.14*x/180;
for(i=1;i<=n;i+=2)
{
p=1;
fact=1;
for(j=1;j<=1;j++)
{
p=p*x;
fact=fact*j;
}
sign=-1*sign;
sum+=sign*p/fact;
}
cout<<"the
value of sinx="<<sum;
getch();
}
Model syllabus (+3): Downoad
List of all practicals: Download
Get all Books: Download
- How to Prepare for IIT-JAM ⇠ ⇠ Click Here
- How to prepare for JEST ⇠ ⇠ Click Here
Post a Comment