当前位置:网站首页>Learn - use do... While loop according to the formula e=1+1/1+ 1/2!+ 1/3!+…+ 1/n! Calculate the value of E (accuracy is 1e-6)
Learn - use do... While loop according to the formula e=1+1/1+ 1/2!+ 1/3!+…+ 1/n! Calculate the value of E (accuracy is 1e-6)
2022-07-24 08:01:00 【Ssaty.】
The first 1 Turn off : use do-while Cycle by formula e=1+1/1!+1/2!+1/3!+…+1/n! Calculation e Value
Our mission : For programming do-while Cycle by formula e=1+1/1!+1/2!+1/3!+…+1/n! Calculation e Value , Until the absolute value of the last term is less than the precision value eps Until , Output e And count the number of accumulated items .
do-while Characteristics of sentences : Execute the loop body unconditionally first , Then judge whether the circulation condition is tenable .
do-while Circulation and while The difference with cycles is that :do-while A loop is to execute the statements in the loop first , Then judge whether the expression is true , If it is true, it continues to loop ; If it is false , Then stop the cycle .
do-while The loop must execute the loop statement at least once .
#include <stdio.h>
int main()
{
/********** Begin **********/
<边栏推荐
- Implement a queue with two stacks.
- Intelligent robots and intelligent systems (Professor Zhengzheng of Dalian University of Technology) -- 3. Industrial robots
- P1739表达式括号匹配题解
- 基于VSCode聊聊编译器那些事儿
- Qt|字符串生成二维码功能
- Basic operation of queue
- Example of dictionary
- 33 introduction to sparksql, dataframe and dataset
- Vertex buffer and shader (the cherno + leranopongl) notes
- MySQL -- subquery scalar subquery
猜你喜欢

Robert operator, Sobel operator, Laplace operator

Vertex buffer and shader (the cherno + leranopongl) notes

Movie recommendation system

Opencv project practice - credit card recognition

33-SparkSql的介绍、DataFrame和DataSet

RBM contrast divergence

Simple Gateway - intranet server safely obtains external network data

Digital twin demonstration project -- Talking about simple pendulum (4) IOT exploration

EZDML reverse engineering import database analysis practical operation tutorial

Debug NO2 check for errors according to the process
随机推荐
The difference between online learning and offline learning
Multiple optimization methods print prime numbers between 100 and 200
MySQL -- subquery scalar subquery
Digital twin demonstration project -- Talking about simple pendulum (2) vision exploration and application scenarios
Robert operator, Sobel operator, Laplace operator
Math。 Round, numeric rounding, underlying code parsing
About the solution of thinking that you download torch as a GPU version, but the result is really a CPU version
Installation and use of CONDA
CNN-VINS
Use of ArrayList
Appium doctor command error pit - resolved
HCIP第七天
jmeter中JSON提取器使用
Implement a queue with two stacks.
abstract class
MySQL 啥时候用表锁,啥时候用行锁?
学习笔记总结篇(一)
Selenium basics controls the scroll bar of the browser
NFT是什么?一篇文章搞懂NFT的概念
MS SQL Server 2019 学习