1、画出下列伪代码程序的流程图和盒图: START IF p THEN WHILE q DO f END DO ELSE BLOCK g n END BLOCK END IF STOP
时间: 2024-02-10 15:43:44 浏览: 216
流程图:
```flow
st=>start: START
op1=>operation: IF p
cond1=>condition: YES or NO?
op2=>operation: WHILE q DO\nf
sub1=>subroutine: BLOCK\ng\nn
e=>end: STOP
st->op1->cond1
cond1(yes)->op2->cond1
cond1(no)->sub1->e
```
盒图:
```
+-------+
| START |
+-------+
|
v
+------------------------+
| IF p |
| |
| +---------------------+|
| | WHILE q DO || YES
| | f ||--------->+
| | || |
| +---------------------+| |
| | |
| +---------------------+| |
| | BLOCK || |
| | g || NO |
| | n ||-------->+
| +---------------------+| |
| | |
+------------------------+ |
|
v
+-------+
| STOP |
+-------+
```
阅读全文