当前位置:网站首页>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;
}
边栏推荐
- 一文了解微分段应用场景与实现机制
- 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
- Common shortcut keys in PCB
- Polestar美股上市:5.5万台交付如何支持得起超200亿美元估值
- Mongodb index
- 7-9 one way in, two ways out (25 points)
- 论文分享:Generating Playful Palettes from Images
- Solr series of full-text search engines - basic principles of full-text search
- 关于敏捷的一些概念
- dllexport和dllimport
猜你喜欢

Tonybot humanoid robot infrared remote control play 0630

剑指 Offer 28. 对称的二叉树

7-15 calculation of PI

Comprehensive evaluation of good-looking, easy-to-use and powerful handwriting note taking software: notability, goodnotes, marginnote, handwriting, notes writers, collanote, collanote, prodrafts, not

Eight sorts

How to query the baby category of tmall on Taobao

Concat and concat_ Ws() differences and groups_ Use of concat() and repeat() functions

泰凌冲刺科创板:拟募资13亿 国家大基金与小米长江是股东

必贝特医药冲刺科创板:年营收97万亏损1.37亿 拟募资20亿

Puzzle (016.3) is inextricably linked
随机推荐
Niuke: crossing the river
ShowMeBug入驻腾讯会议,开启专业级技术面试时代
LNMP环境mail函数不能发送邮件解决
7-24 reduction of the simplest fraction (rolling Division)
Output student grades
洛谷P5018 [NOIP2018 普及组] 对称二叉树 题解
中感微冲刺科创板:年营收2.4亿净亏1782万 拟募资6亿
分布式事务(Seata) 四大模式详解
MySQL multi table query subquery
如何查询淘宝天猫的宝贝类目
泰凌冲刺科创板:拟募资13亿 国家大基金与小米长江是股东
Plane vector addition
retrofit
Statistical capital consonants
Thinking about the arrangement problem in the backtracking problem (leetcode questions 46 and 47)
Get permissions dynamically
ZABBIX saves the page blank after adding calculated items
String reverse order
剑指 Offer 28. 对称的二叉树
Stop asking yourself if you are suitable for software testing