Traditional Culture Encyclopedia - Photography major - How to write sine wave in C language
How to write sine wave in C language
The source code is as follows:
# include # include # define EX 0.00000 1
# Define PI 3. 14 159265
int main()
{
double x=0.0,temp= 1.0,sin = 0.0
int I;
Printf ("Please enter degree:");
scanf("%lf ",& ampx);
x = x * PI/ 180;
temp = x; I = 0;
while ( fabs(temp)>EX)...{
sin+= temp;
I+= 2;
temp =(- 1)* temp * x * x/((I+ 1)*(I));
}
printf("sin(%lf) = %lf ",x,sin);
Printf ("the number is %d", i);
Returns 0;
}
Extended data
C language to write a program to output a box source code is as follows:
# Contains?
int? Master ()
{
int? I,j,n;
scanf("%d ",& ampn);
for(I = 0; I
printf(" * ");
Or what?
printf("? );
}
printf(" \ n ");
}
Return? 0; ?
}
- Previous article:Which decoration company in Yiwu is good?
- Next article:What's the name of a boy named Li born in year of the snake?
- Related articles
- What's the difference between warm yellow light, warm white light and white light?
- What interesting places in Northeast China are suitable for National Day travel?
- The content of defense at the end of class is divided into several parts.
- Photography subject knowledge kaodian daquan
- Does photography affect the eyes?
- The price of hiring a graphic model
- What software is used for graphic design?
- Aesthetics | Degas said, I am not an impressionist.
- A brief introduction to the story of the girl who kissed the wolf
- Design paper of information management system