当前位置:网站首页>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;
}
边栏推荐
- Recent learning summary
- Comprehensive evaluation of good-looking, easy-to-use and powerful handwriting note taking software: notability, goodnotes, marginnote, handwriting, notes writers, collanote, collanote, prodrafts, not
- Adc128s022 ADC Verilog design and Implementation
- 如何查询淘宝天猫的宝贝类目
- Mysql多表查询 #子查询
- Niuke: crossing the river
- Although not necessarily the best, it must be the hardest!
- 使用并行可微模拟加速策略学习
- Plane vector addition
- Understand the application scenario and implementation mechanism of differential segment
猜你喜欢

Thinking about the arrangement problem in the backtracking problem (leetcode questions 46 and 47)

Tiantu investment sprint Hong Kong stocks: asset management scale of 24.9 billion, invested in xiaohongshu and Naixue

剑指 Offer 28. 对称的二叉树

Pyqt interface production (login + jump page)

Showmebug entered Tencent conference, opening the era of professional technical interview

x86汇编语言-从实模式到保护模式 笔记

Leetcode (4) - - trouver la médiane de deux tableaux ordonnés positifs

Analysis of gene family characteristics - chromosome location analysis

Happy capital new dual currency fund nearly 4billion yuan completed its first account closing

retrofit
随机推荐
Address book sorting
超简单手机地图开发
tonybot 人形机器人 查看端口并对应端口 0701
Tonybot humanoid robot starts for the first time 0630
Showmebug entered Tencent conference, opening the era of professional technical interview
pyQt界面制作(登录+跳转页面)
MySQL multi table query subquery
Analysis of gene family characteristics - chromosome location analysis
SSH access control, blocking the IP when logging in repeatedly to prevent brute force cracking
中感微冲刺科创板:年营收2.4亿净亏1782万 拟募资6亿
Similarities and differences between Allegro, OrCAD, net alias, port, off page connector and how to select them
tonybot 人形機器人 紅外遙控玩法 0630
Luogu p5018 [noip2018 popularization group] symmetric binary tree problem solution
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
Although not necessarily the best, it must be the hardest!
7-6 mixed type data format input
分布式事务(Seata) 四大模式详解
Time conversion ()
China PETG market forecast and Strategic Research Report (2022 Edition)
Zzuli:1041 sum of sequence 2