⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hcx1.cpp

📁 公式计算例子关于sin方程组
💻 CPP
字号:
// hcx1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream.h>
#include <math.h>

void main()
{double k,s,r;
 double tsin(double x);
  cout<<"r=";
  cin>>r;
  cout<<"s=";
  cin>>s;
  if(r*r<=s*s)
	  k=sqrt(tsin(r)*tsin(r)+tsin(s)*tsin(s));
  else
	  k=tsin(r*s)/2;
  cout<<k<<endl;

}
double tsin(double x)
{double p=0.000001,g=0,t=x;
 int n=1;
 do{
	  g=g+t;
	  n++;
	  t=-t*x*x/(2*n-1)/(2*n-2);
 }while(fabs(t)>=p);
 return g;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -