当前位置:网站首页>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;
}
边栏推荐
- 7-6 mixed type data format input
- Puzzle (016.4) domino effect
- C language,%d% Difference between 2D%2d%02d
- 【7.3】146. LRU缓存机制
- Find the sum of the elements of each row of the matrix
- Some concepts about agile
- 7-2 and then what time (15 minutes)
- How Facebook moves instagram from AWS to its own server
- Statistical capital consonants
- 【北大青鸟昌平校区】互联网行业中,哪些岗位越老越吃香?
猜你喜欢
中感微冲刺科创板:年营收2.4亿净亏1782万 拟募资6亿
一文了解微分段应用场景与实现机制
Frequently asked questions: PHP LDAP_ add(): Add: Undefined attribute type in
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
洛谷P5018 [NOIP2018 普及组] 对称二叉树 题解
Leetcode (4) - - trouver la médiane de deux tableaux ordonnés positifs
Timecho of Tianmou technology completed an angel round financing of nearly 100 million yuan to create a native timing database of the industrial Internet of things
Luogu p5018 [noip2018 popularization group] symmetric binary tree problem solution
adc128s022 ADC verilog设计实现
天图投资冲刺港股:资产管理规模249亿 投了小红书与奈雪
随机推荐
Programming language: the essence of type system
动态获取权限
数学常数表 by q779
Preliminary summary of structure
Similarities and differences between Allegro, OrCAD, net alias, port, off page connector and how to select them
tonybot 人形机器人 红外遥控玩法 0630
Leetcode (4) -- find the median of two positively ordered arrays
Plane vector addition
X86 assembly language - Notes from real mode to protected mode
7-18 finding the single root of polynomial by dichotomy
论文分享:Generating Playful Palettes from Images
556. The next larger element III
Accelerating strategy learning using parallel differentiable simulation
Timecho of Tianmou technology completed an angel round financing of nearly 100 million yuan to create a native timing database of the industrial Internet of things
SSH access control, blocking the IP when logging in repeatedly to prevent brute force cracking
retrofit
etcd集群权限管理和账号密码使用
Add ZABBIX calculation type itemcalculated items
SSH访问控制,多次失败登录即封掉IP,防止暴力破解
556. 下一个更大元素 III