当前位置:网站首页>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;
}
边栏推荐
- Code writing and playing method of tonybot humanoid robot at fixed distance
- 7-17 crawling worms (break exercise)
- How Facebook moves instagram from AWS to its own server
- Eight sorts
- Sendmail无法发送邮件及发送过慢解决
- Zzuli:1041 sum of sequence 2
- How to query the baby category of tmall on Taobao
- Ultra simple mobile map development
- 556. The next larger element III
- 修改数据库中的记录为什么报这个错
猜你喜欢
天谋科技 Timecho 完成近亿元人民币天使轮融资,打造工业物联网原生时序数据库
Tonybot humanoid robot infrared remote control play 0630
7-15 calculation of PI
Analysis of gene family characteristics - chromosome location analysis
Bibit pharmaceutical rushed to the scientific innovation board: annual revenue of 970000, loss of 137million, proposed to raise 2billion
Doris学习笔记之数据表的创建
Eight sorts
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
ShowMeBug入驻腾讯会议,开启专业级技术面试时代
Tiantu investment sprint Hong Kong stocks: asset management scale of 24.9 billion, invested in xiaohongshu and Naixue
随机推荐
Leetcode (4) -- find the median of two positively ordered arrays
Tonybot Humanoïde Robot Infrared Remote play 0630
Thinking about the arrangement problem in the backtracking problem (leetcode questions 46 and 47)
ShowMeBug入驻腾讯会议,开启专业级技术面试时代
Accelerating strategy learning using parallel differentiable simulation
超简单手机地图开发
US stock listing of polar: how can the delivery of 55000 units support the valuation of more than 20billion US dollars
【北大青鸟昌平校区】互联网行业中,哪些岗位越老越吃香?
Strategy, tactics (and OKR)
Programming language: the essence of type system
Doris学习笔记之数据表的创建
puzzle(016.4)多米诺效应
Find the sum of the elements of each row of the matrix
How to query the baby category of tmall on Taobao
亚马逊、速卖通、Lazada、Shopee、eBay、wish、沃尔玛、阿里国际、美客多等跨境电商平台,测评自养号该如何利用产品上新期抓住流量?
【7.3】146. LRU caching mechanism
Zzuli:1041 sum of sequence 2
556. 下一个更大元素 III : 简单构造模拟题
Creation of data table of Doris' learning notes
Table of mathematical constants by q779