当前位置:网站首页>第一章:拓广同码小数和s(d, n)
第一章:拓广同码小数和s(d, n)
2022-07-03 19:16:00 【股_四】
int main()
{
int a, b, d, j, n;
double t, s;
printf(" 请输入整数d, n; ");
scanf("%d, %d", &d, &n);
a = d;
b = 1;
while (a > 0)
{
b = b * 10;
a = a / 10;
}
t = s = 0;
for (j = 1; j <= n; j++)
{
t = t / b + (double)d / b;
s += t;
}
printf(" s(%d, %d) = %.8f\n", d, n, s);
return 0;
}
结果:
边栏推荐
- How to build an efficient information warehouse
- KINGS
- The most valuable thing
- Zhang Fei hardware 90 day learning notes - personal record on day 5. Please see my personal profile / homepage for the complete record
- Why should the gradient be manually cleared before back propagation in pytorch?
- Pecan — @expose()
- 【数学建模】基于matlab船舶三自由度MMG模型【含Matlab源码 1925期】
- QT -- qfileinfo file information reading
- 【疾病识别】基于matlab GUI机器视觉肺癌检测系统【含Matlab源码 1922期】
- Free year-end report summary template Welfare Collection
猜你喜欢
![[disease identification] machine vision lung cancer detection system based on Matlab GUI [including Matlab source code 1922]](/img/fc/00835b95537cf889588502a3d13bc9.png)
[disease identification] machine vision lung cancer detection system based on Matlab GUI [including Matlab source code 1922]

SSM integration - joint debugging of front and rear protocols (list function, add function, add function status processing, modify function, delete function)

Think of new ways

During MySQL installation, the download interface is empty, and the components to be downloaded are not displayed. MySQL installer 8.0.28.0 download interface is empty solution

What is the content of game modeling

Merge K ascending linked lists

SQL injection for Web Security (1)

Record the errors reported when running fluent in the simulator

Why should we do feature normalization / standardization?

Flutter network and data storage framework construction-b1
随机推荐
High concurrency Architecture - distributed search engine (ES)
ActiveMQ的基础
High concurrency Architecture - read write separation
Scrapy爬虫框架
The way to treat feelings
TFs and SVN [closed] - TFs vs SVN [closed]
A green plug-in that allows you to stay focused, live and work hard
flask 生成swagger文档
I didn't cancel
【学术相关】顶级论文创新点怎么找?中国高校首次获CVPR最佳学生论文奖有感...
Web Security (VIII) what is CSRF attack? Why can token prevent csdf attacks?
EGO Planner代码解析bspline_optimizer部分(3)
The most valuable thing
HOW TO WRITE A DAILY LAB NOTE?
During MySQL installation, the download interface is empty, and the components to be downloaded are not displayed. MySQL installer 8.0.28.0 download interface is empty solution
How to design a high concurrency system
This Chinese numpy quick look-up table is too easy!
Simple solution of physical backup and restore of Damon database
[academic related] how to find the innovation of top papers? Chinese universities won the CVPR Best Student Thesis Award for the first time
【Proteus仿真】用24C04与1602LCD设计的简易加密电子密码锁