当前位置:网站首页>第一章:求同吗小数和s(d, n)
第一章:求同吗小数和s(d, n)
2022-07-03 19:16:00 【股_四】
int main()
{
int d, j, n;
double t, s;
printf(" 请输入整数d, n:");
scanf("%d, %d", &d, &n);
t = s = 0;
for (j = 1; j < n; j++)
{
t = t / 10 + (double)d / 10;
s += t;
}
printf(" S(%d, %d) = %.8f\n", d, n, s);
return 0;
}
结果验证:
边栏推荐
- Sentinel source code analysis part II - sentinel dashboard console startup and configuration
- PyTorch中在反向传播前为什么要手动将梯度清零?
- 235. 二叉搜索樹的最近公共祖先【lca模板 + 找路徑相同】
- Record: MySQL changes the time zone
- Flume learning notes
- Buuctf's different flags and simplerev
- Smart wax therapy machine based on STM32 and smart cloud
- Why should the gradient be manually cleared before back propagation in pytorch?
- [proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD
- How to design a high concurrency system
猜你喜欢
Help change the socket position of PCB part
PyTorch中在反向传播前为什么要手动将梯度清零?
Record the errors reported when running fluent in the simulator
[free sharing] kotalog diary2022 plan electronic manual ledger
记录在模拟器中运行flutter时报的错
EGO Planner代码解析bspline_optimizer部分(2)
【LeetCode】【SQL】刷题笔记
Record: writing MySQL commands
Basic principle of LSM tree
[academic related] how to find the innovation of top papers? Chinese universities won the CVPR Best Student Thesis Award for the first time
随机推荐
Ctrip will implement a 3+2 work system in March, with 3 days on duty and 2 days at home every week
Thesis study - 7 Very Deep Convolutional Networks for Large-Scale Image Recognition (3/3)
KINGS
Record: writing MySQL commands
These problems should be paid attention to in the production of enterprise promotional videos
cipher
【学术相关】顶级论文创新点怎么找?中国高校首次获CVPR最佳学生论文奖有感...
Web Security (VII) specific process of authentication with session cookie scheme
Pecan — Overview
Buuctf's different flags and simplerev
I study database at station B (4): DQL
Record: MySQL changes the time zone
我们做了一个智能零售结算平台
__ Weak and__ The difference between blocks
FBI warning: some people use AI to disguise themselves as others for remote interview
What does a really excellent CTO look like in my eyes
Record the errors reported when running fluent in the simulator
High concurrency Architecture - read write separation
【疾病识别】基于matlab GUI机器视觉肺癌检测系统【含Matlab源码 1922期】
UE source code analysis: uccharactermovementcomponent - rootmotion