当前位置:网站首页>Zzuli:1053 sine function
Zzuli:1053 sine function
2022-07-03 14:34:00 【Snake_____】
Title Description

Input x, Calculate the front of the above formula 10 Xiang He .
Input
Enter a real number x.
Output
Output a real number , That is, the front of the sequence 10 Xiang He , The result is reserved 3 Decimal place .
The sample input Copy
1
Sample output Copy
0.841
#include <stdio.h>
int main()
{
int i;
double x;
scanf("%lf",&x);
double sum=0,den=1,mol=x,sign=1;
for(i=1;i<=10;i++)
{
sum+=sign*mol/den;
sign=(-1)*sign;
den=den*(2*i)*(2*i+1);
mol=mol*x*x;
}
printf("%.3lf",sum);
return 0;
}
边栏推荐
猜你喜欢

retrofit

Pyqt interface production (login + jump page)

论文分享:Generating Playful Palettes from Images

NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon

Accelerating strategy learning using parallel differentiable simulation

亚马逊、速卖通、Lazada、Shopee、eBay、wish、沃尔玛、阿里国际、美客多等跨境电商平台,测评自养号该如何利用产品上新期抓住流量?

天图投资冲刺港股:资产管理规模249亿 投了小红书与奈雪

NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线

如何查询淘宝天猫的宝贝类目

NPM install is stuck with various strange errors of node NPY
随机推荐
Zzuli:1042 sum of sequence 3
分布式事务(Seata) 四大模式详解
dllexport和dllimport
Accelerating strategy learning using parallel differentiable simulation
Luogu p5194 [usaco05dec]scales s solution
【7.3】146. LRU caching mechanism
LNMP环境mail函数不能发送邮件解决
Tailing rushes to the scientific and Technological Innovation Board: it plans to raise 1.3 billion, and Xiaomi Changjiang is the shareholder
Tonybot humanoid robot starts for the first time 0630
7-3 rental (20 points)
Understand the application scenario and implementation mechanism of differential segment
String substitution
7-23 currency conversion (using array conversion)
7-10 stack of hats (25 points) (C language solution)
Get permissions dynamically
The mail function of LNMP environment cannot send mail
MySQL multi table query subquery
String reverse order
Detailed explanation of four modes of distributed transaction (Seata)
7-3 count the number of words in a line of text