第四次作业

这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/2026gjyycxsj
这个作业要求在哪里: https://edu.cnblogs.com/campus/fzu/2026gjyycxsj/homework/16750
姓名:林子珩
学号:0102600103

程序运行

1

image

2

image

程序设计

1

while

image
可以用sign = -sign来实现加减交替

do while

image

区别:do while无论如何会执行一次,while如果第一个输入不符合条件就一次都不执行

2

image

3

image

4

image

5

image

改良版

image

究极改良_函数版

image

6

image
shhhh...
image

改良版_switch+函数改写

image

7

image

8

image

课本练习

6.1

image

6.5

image

6.7

image

6.10

image

6.13

image

6.16

image

6.18

image

7.1

image

7.2

image

7.4

image

7.5

image

7.7

image

posted @ 2026-11-07 11:20  Deadline_4  阅读(17)  评论(0)    收藏  举报