发布了第四次作业
This commit is contained in:
parent
91feaacd2a
commit
dc96fed368
1 changed files with 41 additions and 0 deletions
41
source/_posts/homework4.md
Normal file
41
source/_posts/homework4.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
title: 第四次作业
|
||||
mathjax: true
|
||||
date: 2020-11-04 23:10:54
|
||||
tags:
|
||||
---
|
||||
|
||||
|
||||
# P137-3
|
||||
|
||||
输入两个正整数 $m$ 和 $n$ ,求其最大公约数和最小公倍数。
|
||||
|
||||
# P137-5
|
||||
|
||||
求 $S_{n} = a + aa + aaa + \cdots + \overbrace{aa \cdots a}^{n个a}$ 之值,其中 $a$ 是一个数字, $n$ 表示 $a$ 的位数, $n$ 由键盘输入。例如:
|
||||
|
||||
$2 + 22 + 222 + 2222 + 22222$ (此时 $n = 5$ )
|
||||
|
||||
# P138-14
|
||||
|
||||
用牛顿迭代法求下面方程在 $1.5$ 附近的根:
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
2 x^{3} - 4 x^{2} + 3 x - 6 = 0
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
# P138-15
|
||||
|
||||
用二分法求下面方程在 $(-10, 10)$ 的根:
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
2 x^{3} - 4 x^{2} + 3 x - 6 = 0
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
# 选择排序
|
||||
|
||||
定义一个一维数组,用选择法给任意输入的十个整数排序。
|
Loading…
Reference in a new issue