中国铁道建设出版
int lcm(int a,int b)
{
int i;
i=b;
}
4-5
#include <iostream.h>
#include <math.h>
double sin(double x,double eps)
{
double term,sum,y; int n=1; //n=0 y=x*x; term=x; sum=0; while(fabs(term)>=eps) { sum+=term; n++; term=term*y/((2*n-2)*(2*n-1)); //((2*n)*(2*n-1)) term*=-1; while(i%a)i+=b; return(i);
}
return sum;
}
void main()
{
}
4-6
#include <iostream.h>
#include <math.h>
float solut(float a,float b,float c,float d)
{ double x,y; cout<<"输入x的值(角度):"; cin>>x; while(x>360)x-=360; y=3.1415926*x/180; cout<<"度数为:"<<x<<"其sin值为:"<<sin(y,1e-6)<<'\n';