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

📄 dpue090.htm

📁 Delphi - Programmierkurs.html
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>

<head>
<title>Delphi Projekt / 躡ung: Nichtabweisende Schleifen</title>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<meta NAME="KeyWords" CONTENT="Repeat, Until, Schleife, Zyklus, Delphi, Informatik, Gymnasium, Plauen, Sachsen, Grundkurs, Mirko, Pabst, Programmierung, Lessing, Unterricht, Schule">
<meta NAME="Author" CONTENT="Mirko Pabst">
</head>

<body TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000" BACKGROUND="acrop_bk.gif">

<table CELLSPACING="0" CELLPADDING="0">
  <tr>
    <td valign="top" width="159"><a name="Anfang"></a><a href="index.htm"><img SRC="athena.gif" ALT="athena.gif (7242 Byte)" border="0" WIDTH="157" HEIGHT="140"></a></td>
    <td valign="top"><div align="center"><center><table BORDER="1" BGCOLOR="#C0C0C0">
      <tr>
        <td ALIGN="center" BGCOLOR="#EEEEEE"><!--webbot bot="ImageMap" rectangle="(301,0) (537, 16)  http://www.lessing-gymnasium.de" rectangle="(228,0) (301, 16)  mailto:mirko.pabst@gmx.de" SRC="top.gif" border="0" startspan --><MAP NAME="FrontPageMap"><AREA SHAPE="RECT" COORDS="301, 0, 537, 16" HREF="http://www.lessing-gymnasium.de"><AREA SHAPE="RECT" COORDS="228, 0, 301, 16" HREF="mailto:mirko.pabst@gmx.de"></MAP><a href="_vti_bin/shtml.exe/dpue090.htm/map"><img ismap usemap="#FrontPageMap" border="0" height="17" src="top.gif" width="593"></a><!--webbot bot="ImageMap" endspan i-checksum="641" --><br>
        <b><font size="+2" color="#FF0000">躡ungen zu Nichtabweisenden Schleifen<br>
        </font></b><big><font color="#FF0000"><em><strong>- Repeat ... Until ... -</strong></em></font></big></td>
      </tr>
      <tr>
        <td ALIGN="center" BGCOLOR="#EEEEEE" valign="middle"><a HREF="index.htm"><img SRC="i.gif" BORDER="0" WIDTH="73" HEIGHT="25"></a>&nbsp;&nbsp;<a HREF="dpue080.htm"><img SRC="l.gif" BORDER="0" WIDTH="25" HEIGHT="25"></a>&nbsp;&nbsp;<a HREF="dpue120.htm"><img SRC="r.gif" BORDER="0" WIDTH="25" HEIGHT="25"></a></td>
      </tr>
      <tr>
        <td ALIGN="left" BGCOLOR="#EEEEEE" valign="middle"><blockquote>
          <p><a href="#1. Struktogramm und Quelltext">1. 躡ertragung Struktogarmm in Quelltext</a><br>
          <a href="#3. Programmieraufgabe">2. &quot;Schreibtischtest&quot; von zyklischen Strukturen<br>
          </a><small>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#2.1. Beispielaufgabe und L鰏ung:">2.1.
          Beispielaufgabe und L鰏ung</a><br>
          &nbsp;&nbsp;&nbsp;&nbsp;<a href="#2.2. Aufgabe zum Schreibtischtest">2.2. Aufgabe zum
          Schreibtischtest</a><br>
          </small><a href="#3. Programmieraufgabe">3. Programmieraufgabe &quot;Eigenwilliger
          Kredit&quot;</a><br>
          <small>&nbsp;&nbsp;&nbsp;&nbsp;- <a href="#Synchronisation von TListBox-Komponenten">Synchronisation
          von TListBox-Komponenten</a><br>
          &nbsp;&nbsp;&nbsp;&nbsp;- <a href="#Ausgabe im W鋒rungsformat">Ausgabe im W鋒rungsformat</a></small></p>
        </blockquote>
        </td>
      </tr>
    </table>
    </center></div></td>
  </tr>
</table>

<p>&nbsp;&nbsp;</p>

<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><a HREF="#Anfang"><img SRC="ho.gif" BORDER="0" WIDTH="25" HEIGHT="24"></a>&nbsp;<a href="#2. &quot;Schreibtischtest&quot;"><img SRC="ru.gif" BORDER="0" ALIGN="TEXTTOP" WIDTH="25" HEIGHT="25"></a>&nbsp;&nbsp;</td>
    <td><font color="#FF0000"><em><strong><big><a name="1. Struktogramm und Quelltext">1.
    躡ertragung Struktogramm in Quelltext</a>:</big></strong></em></font></td>
  </tr>
</table>

<blockquote>
  <p>Als algorithmische Kontrollstrukturen kennen wir von den vorangegangenen Seiten <strong><em>Sequenzen</em>,
  <em>Alternativen</em></strong> und <em><strong>nichtabweisende&nbsp;Zyklen</strong>.</em>
  Diese lassen sich in Probleml鰏ungsalgorithmen in nahezu beliebiger Weise und Tiefe
  miteinander kombinieren bzw. ineinander schachteln. Die nachfolgenden Struktogramme sind
  gem溥 Beispiel a) 1:1 in pascalgerechte Notationen zu 黚ersetzen, wobei <em>&quot;a&quot;</em>
  f黵 eine allgemeine Anweisung und <em>&quot;b&quot;</em> f黵 eine allgemeine Bedingung
  steht.</p>
  <blockquote>
    <table border="1" cellpadding="6" cellspacing="0">
      <tr>
        <td valign="top" bgcolor="#EEEEEE">&nbsp;</td>
        <td valign="top" align="center" bgcolor="#EEEEEE"><big>Struktogramm</big></td>
        <td valign="top" nowrap align="center" bgcolor="#EEEEEE"><big>Pascal-Quelltext</big></td>
      </tr>
      <tr>
        <td valign="top" bgcolor="#EEEEEE"><strong><em>a)&nbsp;&nbsp;&nbsp;</em></strong></td>
        <td valign="top" bgcolor="#FFFFFF"><img src="zstrukt1.gif" alt="zstrukt1.gif (2219 Byte)" WIDTH="278" HEIGHT="163"><p>&nbsp;</td>
        <td valign="top" nowrap bgcolor="#FFFFFF"><blockquote>
          <blockquote>
            <p><font color="#000080"><strong><tt>repeat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
            &nbsp;&nbsp;a1;<br>
            &nbsp;&nbsp;if&nbsp;b1&nbsp;then<br>
            &nbsp;&nbsp;&nbsp;&nbsp;begin<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a2; a3<br>
            &nbsp;&nbsp;&nbsp;&nbsp;end<br>
            &nbsp;&nbsp;else<br>
            &nbsp;&nbsp;&nbsp;&nbsp;a4<br>
            until b2;</tt></strong></font></p>
          </blockquote>
        </blockquote>
        </td>
      </tr>
      <tr>
        <td valign="top" bgcolor="#EEEEEE"><strong><em>b)</em></strong></td>
        <td valign="top" bgcolor="#FFFFFF"><img src="zstrukt2.gif" alt="zstrukt2.gif (2274 Byte)" WIDTH="272" HEIGHT="171"><p>&nbsp;</td>
        <td valign="middle" nowrap align="center" bgcolor="#FFFFFF"><font color="#000080"><big><big><strong><tt>?</tt></strong></big></big></font></td>
      </tr>
      <tr>
        <td valign="top" bgcolor="#EEEEEE"><strong><em>c)</em></strong></td>
        <td valign="top" bgcolor="#FFFFFF"><img src="zstrukt3.gif" alt="zstrukt3.gif (2920 Byte)" WIDTH="272" HEIGHT="253"><p>&nbsp;</td>
        <td valign="middle" nowrap align="center" bgcolor="#FFFFFF"><font color="#000080"><big><big><strong><tt>?</tt></strong></big></big></font></td>
      </tr>
      <tr>
        <td valign="top" bgcolor="#EEEEEE"><strong><em>d)</em></strong></td>
        <td valign="top" bgcolor="#FFFFFF"><img src="zstrukt4.gif" alt="zstrukt4.gif (2882 Byte)" WIDTH="271" HEIGHT="156"><p>&nbsp;</td>
        <td valign="middle" nowrap align="center" bgcolor="#FFFFFF"><font color="#000080"><big><big><strong><tt>?</tt></strong></big></big></font></td>
      </tr>
    </table>
  </blockquote>
  <hr>
</blockquote>

<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><a HREF="#Anfang"><img SRC="ho.gif" BORDER="0" WIDTH="25" HEIGHT="24"></a>&nbsp;<a href="#3. Programmieraufgabe"><img SRC="ru.gif" BORDER="0" ALIGN="TEXTTOP" WIDTH="25" HEIGHT="25"></a>&nbsp;&nbsp;</td>
    <td><font color="#FF0000"><em><strong><big><a name="2. &quot;Schreibtischtest&quot;">2.
    &quot;Schreibtischtest&quot;</a> von zyklischen Strukturen:</big></strong></em></font></td>
  </tr>
</table>

<blockquote>
  <blockquote>
    <table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td valign="top"><font color="#004000"><em><strong>Zweck:&nbsp;</strong></em></font></td>
        <td valign="top"><ul>
          <li>Erkennen der Variablenbelegungen f黵 verschiedene Eingabewerte,</li>
          <li>Nachweis, ob eine Abbruchbedingung bei bestimmten Eingabewerten erreicht wird oder
            nicht. </li>
        </ul>
        </td>
      </tr>
    </table>
    <p><a name="2.1. Beispielaufgabe und L鰏ung:"><big><em><strong><font color="#004000">2.1.
    Beispielaufgabe und L鰏ung:</font></strong></em></big></a></p>
    <blockquote>
      <table border="0" cellpadding="6">
        <tr>
          <td valign="top"><em><strong>a)</strong></em></td>
          <td valign="top">Zu testen ist folgender nichtabweisender Zyklus f黵 die Eingabe
          edit1.text := &#145;4&#146; !<blockquote>
            <p><font color="#000080"><strong><tt>x := StrToInt(edit1.text);<br>
            n := 0; y := 1;<br>
            REPEAT<br>
            &nbsp;&nbsp;n := n+1;<br>
            &nbsp;&nbsp;y := y*2<br>
            UNTIL n = x;<br>
            edit2.text := IntToStr(y);</tt></strong></font></p>
          </blockquote>
          </td>
        </tr>
        <tr>
          <td valign="top"><em><strong>b)</strong></em></td>
          <td valign="top">Welche mathematische Funktion wird von der Struktur realisiert ?</td>
        </tr>
        <tr>
          <td valign="top"><em><strong>c)</strong></em></td>
          <td valign="top">Was w黵de geschehen, wenn man edit1.text mit &#145;-1&#146; belegt ? -
          Schlussfolgerung ?</td>
        </tr>
      </table>
    </blockquote>
    <blockquote>
      <p><font color="#004000"><em><strong>L鰏ung + Hinweise:</strong></em></font></p>
    </blockquote>
    <blockquote>
      <table border="0" cellpadding="6">
        <tr>
          <td valign="top" nowrap><em><strong>zu&nbsp;a)</strong></em></td>
          <td valign="top">Der Schreibtischtest erfolgt am besten in Tabellenform. Hier werden alle
          im Algorithmus relevanten Variablen eingetragen und hinsichtlich der 膎derung ihrer Werte
          beim (gedanklichen) Ablauf des Programmes untersucht. Sind Schleifen im Spiel, so muss
          nach jedem fiktiven Durchlauf das Erreichen der Abbruchbedingung 黚erpr黤t werden.<div align="center"><center><table border="1" cellpadding="6" cellspacing="0" height="251" bgcolor="#FFFFFF">
            <tr>
              <td valign="top" height="22" colspan="2" bgcolor="#EEEEEE"><font color="#000080">Variablen:</font></td>
              <td valign="top" height="22" align="center" bgcolor="#EEEEEE"><font color="#000080">x</font></td>
              <td valign="top" height="22" align="center" bgcolor="#EEEEEE"><font color="#000080">n</font></td>
              <td valign="top" height="22" align="center" bgcolor="#EEEEEE"><font color="#000080">y</font></td>
            </tr>
            <tr>
              <td valign="top" height="22" colspan="2" bgcolor="#EEEEEE"><font color="#000080">Vorgabe:</font></td>
              <td valign="top" height="22" align="center"><font color="#000080"><em>4</em></font></td>
              <td valign="top" height="22" align="center"><font color="#000080"><em>0</em></font></td>
              <td valign="top" height="22" align="center"><font color="#000080"><em>1</em></font></td>
            </tr>
            <tr>
              <td rowspan="5" valign="top" height="165" bgcolor="#EEEEEE"><font color="#000080">Durchl鋟fe:</font></td>
              <td valign="top" height="21" align="center"><font color="#000080">1.</font></td>
              <td valign="top" height="21" align="center"><font color="#000080"><em>4</em></font></td>
              <td valign="top" height="21" align="center"><font color="#000080"><em>1</em></font></td>

⌨️ 快捷键说明

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