### CS代写|程序设计作业代写algorithm Programming代考|PROBLEMS INVOLVING

statistics-lab™ 为您的留学生涯保驾护航 在代写程序设计algorithm Programming方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写程序设计algorithm Programming代写方面经验极为丰富，各种代写程序设计algorithm Programming相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## CS代写|程序设计作业代写algorithm Programming代考|LOOPING

In the flowcharts of the preceding chapter, we demonstrated the sequence and selection logic structures. We now move to the iteration logic structure.
The term iteration means repetition. Sometimes, a procedure should be executed repeatedly. All procedures should be built so that they can be repeated as many times as needed. We should not develop procedures to execute only once. Otherwise, calculators could be sufficient to obtain the results. An iterative logic structure is also known as a loop. Looping means repeating a set of operations to obtain a result repeatedly.

An iteration may be implemented in two ways: a pre-test iteration and post-test iteration. In case of a pre-test iteration, a predicate is tested to decide whether a set of operations is to be performed or not. If the condition implied by the predicate is true, then the desired operations are performed. If it is false, then the iteration is terminated. This is shown in the following diagram.For a post-test iteration, the predicate is tested after performing a set of operations once to decide whether to repeat the set of operations or to terminate the repetition. If the condition happens to be true, then the set of operations is repeated; otherwise, it is not repeated. The diagrammatic structure of this logic is as follows.

## CS代写|程序设计作业代写algorithm Programming代考|The concept of looping

The concept of looping is demonstrated in the following flowchart. Of course, there should be a condition for normal termination. Let us assume that the repetitive task of calculating the discounts and net prices is terminated when we provide negative or zero as the price for the input. Such absurd values are justified for the termination of loops so that the procedure can remain valid for any possible value of the price. We usually use out-connectors and in-connectors with the same label to demonstrate the end point and start point of a loop. These are shown in the flowchart of Problem $2.11 .$
The algorithm corresponding to the flowchart is below:
Step 1. REPEAT STEPS 2 THROUGH 6 (Start Loop)
Step 2. INPUT TO P
Step 3. IF $\mathrm{P} \leq 0$ THEN EXIT (Stop Repetition, i.e., transfer the control to STOP).

Step 4. If $\mathrm{P}<100$
THEN COMPUTE D $\leftarrow \mathrm{P} * 0.12$
ELSE COMPUTE D $\leftarrow \mathrm{P}^{*} 0.18$
END-IF
Step 5. COMPUTE NET_PRICE $\leftarrow \mathrm{P}-\mathrm{D}$
Step 6. PRINT D, NET_PRICE (End of loop)
Step 7. STOP
Note that the out-connector $R$ shows the end point of the loop and the in-connector. R $R \rightarrow$ shows the start point of the loop. The operations starting from the point of the accepting the input price up to the points of printing the output discount and net price are within the loop. It could have been demonstrated without using connectors.

However, we prefer the first flowchart to the following one, because if the flowchart cannot be accommodated on a single page (or in a continuous structure on a single page), it would be difficult or impossible difficult to connect the start point and the end point.

## CS代写|程序设计作业代写algorithm Programming代考|The allowances are based

Problem 3.5. The cost of living $(C L)$, the travel allowance (TA), and medical allowance (MA) of the employees of a company are decided according to the following rules:
$C L=123.75 \%$ of the Basic Pay, subject to a minimum of $\$ 2,000$and a maximum of$\$5,000$.
TA $=57.5 \%$ of the Basic Pay, subject to a minimum of $\$ 300$.$M A=73.5 \%$of the Basic Pay, subject to a maximum of$\$2,000$.
Draw a flowchart to show how $C L, T A$, and MA are calculated.
Task Analysis. The allowances are based on the Basic Pay of an employee. Our input will be the basic pay of the employee for whom the allowances are to be determined. The statement ” $123.75 \%$ of the basic pay subject to a minimum of $\$ 2,000$and a maximum of$\$5,000 “$ implies that $123.75 \%$ of the basic bay is calculated first and then the calculated value is compared with 2,000 ; if it is less than $\$ 2,000$, then the company promises to pay$\$2,000$; if it is not less than $\$ 2,000$then it will be compared with$\$5,000$; if it exceeds $\$ 5,000$, the company will not pay the excess amount, i.e., it agrees to pay, at most,$\$5,000$ : If the calculated value lies in between the two given limits, then that amount will be given as CL. Similarly, the other allowances will be determined. This is demonstrated in the flowchart given on next page.

The algorithm corresponding to the above problem has been given below:
Step 1. $\mathrm{CH} \leftarrow{ }^{” \mathrm{Y}} “$
Step 2. REPEAT STEPS 3 THROUGH 14 WHILE $\mathrm{CH}=$ ” $\mathrm{Y}$ “
Step 3. INPUT TO BASIC
Step 4. COMPUTE CL $\leftarrow$ BASIC* $123.75 / 100$
Step 5. IF CL $<2000$ THEN CL $\leftarrow 2000$ ELSE $\mathrm{IFCL}>5000$
THEN CL $\leftarrow 5000$
END-IF
END-IF
Step 6. PRINT CL
Step 7. COMPUTE TA $\leftarrow$ BASIC $* 57.5 / 100$
Step 8. IF TA $<300$
THEN TA $\leftarrow 300$
END-IF

## CS代写|程序设计作业代写algorithm Programming代考|The concept of looping

Step 1. REPEAT STEPS 2 THROUGH 6 (Start Loop)
Step 2. INPUT TO P
Step 3. IF磷≤0然后退出（停止重复，即将控制转移到停止）。

END-IF

Step 6. PRINT D, NET_PRICE (End of loop)
Step 7. STOP

## CS代写|程序设计作业代写algorithm Programming代考|The allowances are based

C大号=123.75%基本工资的最低限度$2,000并且最多$5,000.

END-IF
END-IF

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。