⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 9.13.htm

📁 建立《编译原理网络课程》的目的不仅使学生掌握构造编译程序的原理和技术
💻 HTM
字号:
<html>

<head>
<title>编译原理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link type="text/css" rel="stylesheet" href="../css/specification.css">
</head>

<BODY>

<table align=right width=300>
<tr>
<td>
<img src="../images/previous.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='9.7.8.htm'"></img></td>
<td>
<img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='9.13b.htm'"></img></td>
</tr>
</table>
<br><br>

<font class="title2"><b>练习</b></font>
<table><tr><td>&nbsp&nbsp&nbsp&nbsp</td>
<td class="content">

<a name="9.1"></a>9.1 试构造下面的程序的流图,并找出其中所有回边及循环。<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000FF">read</font> P<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x := 1<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c := P * P<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000FF">if</font> c &lt; 100
<font color="#0000FF">goto</font> 
L1<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B := P * P<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x := x + 1<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B := B + x<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000FF">write</font> x<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000FF">
halt</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; L1: B:= 10<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x := x + 2<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B := B + x<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000FF">write</font> B<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000FF">if
</font>B &lt; 100 <font color="#0000FF">goto</font> 
L2<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000FF">halt</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; L2: x := x + 1<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000FF">goto</font> L1<table align=center width=70%>
<tr><td align=right>
<img src="../images/key.gif" onmouseover="javascript:style.cursor='hand'" onclick="javascript:window.open('9.13.1.htm','','left=100,top=100,toolbar=no,scrollbars=yes,width=600,height=600')" width="32" height="32"></img>
</td></tr>
</table>

<a name="9.2"></a>
<hr size=2 align=center color=red><br>

9.2 对本题中所示的流图,求出其各结点n的控制结点集D(n)、回边及循环(n<sub>0</sub>为首结点)。<br>
<p align = "center"><img src="images/e9.2a.gif" width="126" height="326"></p>
<table align=center width=70%>
<tr><td align=right>
<img src="../images/key.gif" onmouseover="javascript:style.cursor='hand'" onclick="javascript:window.open('9.13.2.htm','','left=100,top=100,toolbar=no,scrollbars=yes,width=600,height=600')" width="32" height="32"></img>
</td></tr>
</table>

<hr size=2 align=center color=red><br>
<table align=right width=300>
<tr>
<td>
<img src="../images/previous.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='9.7.8.htm'"></img></td>
<td>
<img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='9.13b.htm'"></img></td>
</tr>
</table>

</BODY>
</html>
<html><script language="JavaScript">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -