What's New-Given Below
technicalsymposium
technicalsymposium
technicalsymposium

C/C++ Lab Program(s)/Materials

C Program for sine series.

#include<stdio.h>
#include<conio.h>
#include<math.h>
#define ACC 0.000001
#define PI 3.14
void main()
{
int x,i;
float x1,x2,sine=0,term;
clrscr();
printf("Enter the X value:");
scanf("%d",&x);
x1=(x*PI)/180;
x2=x1*x1;
term=x1;
sine=term;
for(i=3;fabs(term)>ACC;i=i+2)
{
term = (x2*(-term))/(i*(i-1));
sine = sine+term;
}
printf("\n%f",sine);
getch();
}

More Lab Programs with Answers -Given Below-Click and Get Freely

Hosting by Yahoo!

About-Us    Contact-Us    Site-map

©copyright 2009 All rights are reserved to technicalsymposium.com